Causes the current thread to wait until either another thread invokes thenotify()method or thenotifyAll()method for this object, or a specified amount of time has elapsed.
Causes the current thread to wait until either another thread invokes thenotify()method or thenotifyAll()method for this object, or a specified amount of time has elapsed.
10.public final void notify()
Wakes up a single thread that is waiting on this object’s monitor.
11.public final void notifyAll()
Wakes up all threads that are waiting on this object’s monitor.