...
CON34-J. Declare internal lock objects private and final
CON35-J. Do not use an instance lock to protect shared static data
Introduction
| Wiki Markup |
|---|
Memory that can be shared between threads is called _shared memory_ or _heap memory_. The term _variable_ is 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]. |
...