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
How do you end a program?
What is lastindexof in java?
what is difference between equals and ==?
What is the output of the below java program?
What is the syntax and characteristics of a lambda expression? Explain
What are the advantages of java inner classes?
Why we used break and continue statement in java?
What is the difference between delete and delete[]
Explain when classnotfoundexception will be raised ?
When will we prefer to use set and list in java and why?
What are 3 boolean operators?
Is java a pure object oriented language?
What is difference between core java and java ee?
What is void keyword?
What does string mean in java?