Deprecated in Java 1.1. See ThreadGroup.allThreads().
The Interface java.lang.Runnable
This interface provides the building blocks for threads. You implement this interface, define a
run() method on the class, and pass an instance of it to the thread.
public void run()
This is the method you define that actually executes the code you want.
This is the only way to start anything.
The Class java.lang.Object
All objects have a lock and wait set associated with them.
This language keyword causes the current thread to obtain the hidden lock for the object. If the
lock is already held by the current thread, it will essentially increment a counter for that lock (it's a
recursive lock). If the lock is held by a different thread, this thread will go to sleep waiting for it to
public void wait()
This causes the current thread to block until it is awakened by either a call to notify(),
interruption, or by a spurious wakeup. It will release the synchronization lock for the object as it
goes to sleep and reacquire it before returning.
public void notify()
public void notifyAll()
These cause (one/all) of the threads that are in a wait() call for this object to wake up and return.
Search WWH :