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


Please Help Members By Posting Answers For Below Questions

Define Multiprogramming and Multiprocessing in java.

581


What is anti pattern in java?

520


Are maps ordered java?

511


Difference between static synchronization vs. Instance synchronization?

564


What is strings in java?

591






What is the difference between integer parseint and integer valueof?

551


make a method which any number and any type of argument and print sum of that arguments.....

1383


How many types of constructors are used in java?

541


What is protected in java?

527


Program to Find the second largest element in an array.

591


What is the indent key?

592


How the interruptible method gets implemented?

568


What is finally block?

566


What is a conditional equation?

562


Does apple use java?

497