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.
When a thread invokes the wait() method on an object whose lock it holds, does the thread only release the lock on the object it invoked the wait method on, or does it release all the object locks it holds (assuming it holds other object locks)?
The wait() method will only release the lock of the object that you are waiting on. However, it is possible to grab the same lock more than once, and the wait method will release *all* the grabs of the waiting lock.