Java threads can share resources like memory space etc. Critical situation arise when only one thread at a time have access to shared resources. To handle similar situations, java provides high level concepts for synchronization to control access to shared resources. Locks A lock can be used to synchronize access to shared resources. Any thread