what is the difference between sleep() and Wait()?
Answer Posted / vijay
Sleep():
Pause for NUMBER seconds. SUFFIX may be 's' for seconds
(the default), 'm' for minutes, 'h' for hours or 'd' for
days. Unlike most implementations that require NUMBER be
an integer, here NUMBER may be an arbitrary floating point
number.
Wait():
The wait function suspends execution of the current
process until a child has exited, or until a signal is
delivered whose action is to terminate the current
process or to call a signal handling function. If a child
has already exited by the time of the call (a so-
called "zombie" process), the function returns
immediately. Any system resources used by the child are
freed.
Is This Answer Correct ? | 5 Yes | 14 No |
Post New Answer View All Answers
Difference between static binding and dynamic binding?
What are the default and parameterized constructors?
What language is an assembler written in?
Explain the difference between private, public, package and protected in java?
What are different types of references?
how to create multithreaded program? Explain different ways of using thread? : Java thread
How does hashset works in java?
Can we have return statement in finally clause? What will happen?
What are different ways of object creation in java ?
When is the arraystoreexception thrown?
Break statement can be used as labels in java?
Can you achieve runtime polymorphism by data members?
Can you inherit from an abstract class java?
Can we initialize the final blank variable?
Why is method overloading not possible by changing the return type in java?