What is wait() method in java?



Ayush Said

+0 -0

The wait() method is a method in the Object class in Java, which allows a thread to release the lock it holds on an object and enter into a waiting state. The thread can then be awakened later by another thread, which calls the notify() or notifyAll() method on the same object.



Submit Your Response