Causes the thread to wait indefinitly or until the timeout period specified for a thread to call notify() when calling this method. The thread must have the lock of the object specified by this method.
void wait()
The JVM chooses a single thread that is waiting for the lock and wakes it up. The thread calling this method must have the lock for the object referenced by this method.
void notify()
The JVM wakes up all threads waiting on the lock. The thread calling this method must have the lock for the object referenced by this method.
void notifyAll()