- The lock used by the synchronized function is this
- Difference between synchronized function and synchronized code block
The lock of the synchronization function is fixed this,
A lock for a synchronized block of code is an arbitrary object.
Synchronized code blocks are recommended.
The four states of the thread.