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 read a char in java?
Can a class be declared as static?
What is a priority queue java?
How you can force the garbage collection?
What are the types of exceptions?
What is a lambda expression ? What's its use ?
What is computer compiler?
When does a class need a virtual destructor?
What is the list interface?
Can you add null to a list java?
Define inheritance?
How can you make a class serializable in java?
What is the difference between the font and fontmetrics classes in java programming?
Can we declare main () method as non static?
Differentiate jar and war files?