What is the difference between wait(), join(), sleep(), notify() & notifyall() methods

Showing Answers 1 - 3 of 3 Answers

1.wait(),notify(),notifyAll()   methods can only be executed on an object whose lock the thread holds, otherwise, the call will result in an IllegalMonitorStateException.
2.wait(),notify(),notifyAll()  methods  are  Object  class method.
join(),sleep()  methods are  thread  class methods

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions