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
Is math class static in java?
What are access specifiers in java ?
What is the difference between math floor and math round?
What are the major advantages of internal iteration over external iteration?
Does every java program need a main?
Difference between static binding and dynamic binding?
How can you write a loop indefinitely in java programming?
What is a singleton class in Java?
What is the purpose of return statement?
What is meant by design patterns?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is size () in java?
Why we go for collections in java?
Can you pass by reference in java?
Can static method access instance variables ?