Web Programming

Only members of this group can post notes and use other group resources. Join now to get access to all group resources!
Log in or register to join this group

Java/JSP  Difference between wait() and sleep()  Viewed 83868 time(s), 2 post(s)., 12/31/2013 5:25:15 AM - by Mike

Mike 12/31/2013 5:25:15 AM

What is the difference between a wait() and sleep() in Threads?

This content has not been rated yet. 
51 Reputation 3 Total posts
Trika 1/1/2014 8:06:16 PM

sleep() is a method which is used to hold or pause the process for specific time.

wait() method thread goes in waiting state and it will be woken up by notify()

This content has not been rated yet. 
53 Reputation 5 Total posts