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
What is remote method invocation (rmi)?
How many bits is a word?
How do you include a string in java?
How will you communicate between two applets?
What is unmodifiable list in java?
How do you sing an Applet ?
Can we compare two strings in java?
How does thread synchronization occurs inside a monitor?
What is parameters example?
Mention the default values of all the elements of an array defined as an instance variable.
If system.exit (0); is written at the end of the try block, will the finally block still execute?
What is length in java?
what is the difference between yielding and sleeping? : Java thread
What is the protected method modifier?
What is empty list in java?