One can implement threads in two ways:
|
A class that implements the Runnable interface (including the Thread class itself) must implement the run() method containing the "body" of the thread. |
The Runnable interface makes it possible for an applet to utilize threads. (Remember, an applet extends the Applet class and so cannot multiply inherit from the Thread class.) |