The synchronized lock on line 1, does not let threads Lucy and Sam into the blocked code at the same time?
ie)if Lucy enters the synchronized block on line 1 and acquires the lock of "sync" , then Sam cannot enter the synchronized block on line 1 untill Lucy releases the lock?
No other thread can't get into the synchronized block while some thread owns the sync object's lock. When the synchronized block finishes then sync object lock is released and other threads can start to compete to get it. Whoever gets it can then enter the synchronized block.