Question: what is the difference between synchronized method and synchronized block?
Answer: A synchronized method locks on the object instance the method is contained in while a synchronized block can lock on ANY object. For synchronized methods, the lock will be held throughout the method scope, while in the synchronized block, the lock is held only during that block scope also known as critical section.