Difference between wait() and sleep()

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?

1 Like