SyntaxFix
Write A Post
Hire A Developer
Questions
wait releases the lock and sleep doesn't. A thread in waiting state is eligible for waking up as soon as notify or notifyAll is called. But in case of sleep the thread keeps the lock and it'll only be eligible once the sleep time is over.
wait
sleep
notify
notifyAll