What lock does a synchronized instance method acquire in Java?
Correct answer A. The intrinsic lock of the object it is called on
Explanation
A synchronized instance method locks the monitor of this, so two synchronized instance methods on the same object exclude each other while calls on different objects do not. A static synchronized method instead locks the Class object. Each object has only one intrinsic lock, and it is reentrant for the thread that already holds it.
Answer checked How we write and check questions
Discussion