Package java.lang
Class Object

Public Method wait

final void wait()

Throws:

final void wait(int timeout)

Throws:

final void wait(int timeout, int nanos)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_


Parameters

Description:

Causes the current thread to wait until another thread invokes the notify() or the notifyAll() method for this object or a certain amount of time has elapsed.

The current thread must own this object's monitor.

wait() method:

Behaves as if wait(0) were called.

wait(int timeout) method:

Wait until notified or timout in ms has been reached. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.

wait(int timeout, int nanos) method:

Like the above method except that it allows for finer granularity.