...
CON38-J. Synchronize on a class literal instead of the return value of getClass()
Introduction
| Wiki Markup |
|---|
Memory that can be shared between threads is called _shared memory_ or _heap memory_. The term _variable_ as used in this section refers to both fields and array elements \[[JLS 05|AA. Java References#JLS 05]\]. Variables that are shared between threads are referred to as shared variables. All instance fields, {{static}} fields, and array elements are shared variables and are stored in heap memory. Local variables, formal method parameters, or exception handler parameters are never shared between threads and are not affected by the [memory model|BB. Definitions#memory model]. |
...