1
JavaIntermediate#concurrency
A synchronized method locks the entire method using 'this' (or the class object for static methods) as the monitor. A synchronized block locks only the specified critical section on a chosen object, allowing finer-grained control and better performance.
public void increment() { synchronized(this) { count++; } } // fine-grained
// vs
public synchronized void increment() { count++; } // whole method locked