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
Variables used in a switch statement can be used with which datatypes?
Explain the advantages of packages in java?
What is the use of static methods?
What do you mean by constructor?
What do you understand by classes in java?
What is a null check?
What is the difference between an inner class and a sub-class?
What are the two parts of a conditional statement?
how do I create a runnable with inheritance? : Java thread
What is the difference between serial and throughput garbage collector?
Is java type safe?
Why java is called not pure object oriented language?
What does arrays sort do in java?
How to stop a thread in java? Explain about sleep () method in a thread?
What all methods are used to prevent thread execution ?