Synchronized methods and blocks must acquire a lock before running |
Code will therefore not run at the same time as other code that needs access to the same resource. |
Each object has one lock associated with it and each class has exactly one lock |
When invoked, a synchronized method waits until it can acquire the lock for the current instance (i.e., this); a static synchronized method waits to acquire the class lock |
Lock is released when code is done executing |
Locks are advisory |
synchronized blocks specify the object on which to synchronize |