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 to write custom exception in java?
How do you remove spaces in java?
Explain about member inner classes?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
What are the different data types in java?
What are keywords in java?
How large is a boolean?
Can we override private methods?
What is valid keyword in java?
what is method reference in java 8?
Why put method is used?
What is a singleton class? Give a practical example of its usage.
How many types of variables are there?
How does remove work in java?
What is the difference between a static and a non-static inner class in java programming?