Java / Java Multithreading
Can a thread wait on multiple objects in Java?
No. A thread cannot wait on more than one object at a time.
The wait() and notify() methods are object specific and invoke on the object. The wait() method suspends the current thread of execution, and instructs the object to keep track of the suspended thread. The notify() method tells the object to wake up the suspended threads that it is currently keeping track of.
More Related questions...