Domanda di colloquio di Netflix

What is difference between notify and notifyall?

Risposta di colloquio

Anonimo

12 apr 2012

Notify()/NotifyAll() is used to notify the objects which are in wait() mode so that they can again return back to the runnable mode. Notify() will inform the object to wakes up the current suspended thread. NotifyAll() will inform the object to wake up all the suspended threads