wait() : wait() method releases the lock on object until some other thread acquires the lock and calls notify().
notify() :notify() method wakes up the thread that called wait on the same object.
notfiyAll() :notifyAll() method wakes up all the threads that called wait() on the same object.
The highest priority threads will run first.
All the above three methods are in object class and are called only in synchronized context.
All the above three methods must handle InterruptedException by using throws clause or by using try
catch clause.