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 are the principle concepts of oops?
How do you reverse a list?
How do you use compareto?
What access modifiers can be used for class ?
How to check if a list is sorted in java?
Is there any difference between synchronized methods and synchronized statements?
Can we have any other return type than void for main method?
what is a thread pool in java and why is it used?
Explain about the performance aspects of core java?
Is a boolean 1 bit?
Which class is the superclass for every class in java programming?
What are generic methods?
What if I write static public void instead of public static void in java?
What are the types of strings?
Is null a string or object in java?