What is the difference between a wait() and sleep() in Threads?
wait()
sleep()
Is my understanding that a wait()-ing Thread is still in runni
wait() is given inside a synchronized method whereas sleep() is given inside a non-synchronized method because wait() method release the lock on the object but sleep() or yield() does release the lock().
yield()
lock()