37 Quotes About Java

  • Author Brian Goetz
  • Quote

    When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it should not be reordered with other memory operations. Volatile variables are not cached in registers or in caches where they are hidden from other processors, so a read of a volatile variable always returns the most recent write by any thread.

  • Tags
  • Share

  • Author Brian Goetz
  • Quote

    Debugging tip: For server applications, be sure to always specify the -server JVM command line switch when invoking the JVM, even for development and testing. The server JVM performs more optimization than the client JVM, such as hoisting variables out of a loop that are not modified in the loop; code that might appear to work in the development environment (client JVM) can break in the deployment environment (server JVM).

  • Tags
  • Share

  • Author Brian Goetz
  • Quote

    From the perspective of a class C, an alien method is one whose behavior is not fully specified by C. This includes methods in other classes as well as overrideable methods (neither private nor final) in C itself. Passing an object to an alien method must also be considered publishing that object. Since you can’t know what code will actually be invoked, you don’t know that the alien method won’t publish the object or retain a reference to it that might later be used from another thread.

  • Tags
  • Share

  • Author Brian Goetz
  • Quote

    Once an object escapes, you have to assume that another class or thread may, maliciously or carelessly, misuse it. This is a compelling reason to use encapsulation: it makes it practical to analyze programs for correctness and harder to violate design constraints accidentally.

  • Tags
  • Share

  • Author Brian Goetz
  • Quote

    Accessing shared, mutable data requires using synchronization; one way to avoid this requirement is to not share. If data is only accessed from a single thread, no synchronization is needed. This technique, thread confinement, is one of the simplest ways to achieve thread safety. When an object is confined to a thread, such usage is automatically thread-safe even if the confined object itself is not.

  • Tags
  • Share


  • Author Martha Gellhorn
  • Quote

    Dr. Soekarno was always exactly what he was in the beginning, a whizz-bang demagogue, an opportunist, just another little dictator. U.S. officialdom never tires of backing that type. Nor does U.S. officialdom take sufficient note of the writing on the wall, such as: Down With All Whites. I wonder what the phrase looks like in Vietnamese.

  • Tags
  • Share

  • Author Ayu Utami
  • Quote

    Orang Jawa sekarang sudah menjadi orang Indonesia yang kering!" - Jacques Cherer

  • Tags
  • Share

  • Author Mr Alok Kumar
  • Quote

    If you believe there is always a better way, take the next step in exploring your potential with ZaranTech

  • Tags
  • Share