About Question enthuware.ocpjp.v8.2.1099 :
Posted: Thu Mar 17, 2016 4:57 pm
From JavaDoc:The thread that has called the wait() will not come out of WAITING state until some other thread calls notify or notifyAll on the same object or interrupts the thread.
I think its need to add "or spurious wakeups" to option.As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop:
synchronized (obj) {
while (<condition does not hold>)
obj.wait();
... // Perform action appropriate to condition
}