Home > DeveloperSection > Interviews > What is Difference between wait() and sleep()

Posted on    July-03-2015 1:20 AM

 Java Java  Threading  Multiple Threading 
 2 Answer(s)
  432  View(s)
Rate this:

Derek Honeybun
Derek Honeybun

Total Post:3

Posted on    July-03-2015 1:20 AM

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

Is my understanding that a wait()-ing Thread is still in running mode and uses CPU cycles but a sleep()-ing does not consume any CPU cycles correct?

Why do we have both wait() and sleep(): how does their implementation vary at a lower level?

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    July-03-2015 8:46 AM

Refer here :

Don't want to miss updates? Please click the below button!

Follow MindStick