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
Can an interface have a constructor?
In a container there are 5 components. I want to display the all the components names, how will you do that one?
What is constructor in java ?
Difference between a process and a program?
What is Mutex (Mutual Exclusion Object) ?
Where pragma is used?
What is the role of the java.rmi.naming class?
Implement a stack with push (), pop() and min() in O(1) time.
Why javac is not recognized?
How hashmap increases its size in java?
Define class?
Why are there no global variables in java?
What is nan inf?
What is the purpose of static methods and variables?
Can an unreferenced object be referenced again?