what is the difference between sleep() and Wait()?
Answer Posted / deepak divvela
The main difference is if we need the thread wants to block
particular period of time we just choose sleep().
and when the thread called wait() means it will blocked
untill we will call notify(),notifyAll();
| Is This Answer Correct ? | 49 Yes | 14 No |
Post New Answer View All Answers
What is the difference between jdk, jre, and jvm?
Explain about main() method in java ?
How is java created?
What do you understand by java virtual machine?
What is the use of optional ?
How to sort array in descending order in java?
What is lambda expression in java?
Is java same as core java?
Why is a string immutable?
What is an anonymous class in java?
Explain inheritance in java?
Where are the local variables stored?
What are format specifiers in java?
What is the difference between notify and notifyall method?
What is supplier in java?