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 we sort hashmap in java?
What do you mean by thread safe?
What is the major difference between linkedlist and arraylist?
State one difference between a template class and class template.
How many days will it take to learn java?
What does escaping a character mean?
Variables used in a switch statement can be used with which datatypes?
Can we restart a dead thread in java?
What are 3 data types?
Why hashcode is used in java?
Difference between static binding and dynamic binding?
How do you declare a variable?
What is a flag value?
What is methodological framework?
What is class variable java?