what is the difference between sleep() and Wait()?
Answer Posted / vinay kumar
sleep() will wait go to sleep for amount of time that is specified in it.After the times finishes it resumes automatically.
wait() will also wait for some I/O and will NOT resume automatically but will resume only when notify() or notifyall() is called.
| Is This Answer Correct ? | 19 Yes | 7 No |
Post New Answer View All Answers
How do you sort arraylist in descending order?
What are the types of relation?
When should I use a singleton?
What are the benefits of java?
What are the two categories of data types in the java programming language?
What is json parser in java?
What is the purpose of a volatile variable?
When will we use them?
How big is a gigabyte?
Where is singleton pattern used?
What are the features of junit?
What is the best way to findout the time/memory consuming process?
What is the difference between abstract class and interface1? What is an interface?
What are register variables what are the advantages?
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?