Next: Thread methods
Up: Threads
Previous: Creating a threaded class
Contents
- Cannot always extend the Thread class because of single inheritance.
- Implement the java.lang.Runnable interface (must implement the run() method).
- Include a Thread attribute in the class.
- The run() method still defines the behavior of the thread while it is running.
Next: Thread methods
Up: Threads
Previous: Creating a threaded class
Contents