Type Reason Java.Lang.IllegalMonitorStateException if the thread calling this method is not the owner of this object's monitor.
Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up. The threads will not run immediately. The thread that called notify() has to release the object's monitor first. Also, the threads still have to compete against other threads that try to synchronize on the same object.
This method can only be invoked by a thread which owns this object's monitor. A thread becomes owner of an object's monitor