This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
s3528090, Welcome to Javaranch We'd like you to read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you. All Java objects have what we call a lock. By synchronizing some code on an object, you can obtain exclusive access to that object. Since a Thread is an object, you can also get a lock on a Thread instance. Sometimes, when a thread is executing, it needs to get the lock of some object to continue its execution. If it cannot obtain the object lock, the thread will be "suspended" until it manages to get the lock to that object. Please, read the following for completeness: JLS 17.13 Locks and Synchronization