previous | start | next

Running a Thread

  1. Implement a class that implements the Runnable interface
    public interface Runnable
    {
       void run();
    }
  2. Place the code for your task into the run method of your class
    public class MyRunnable implements Runnable
    {
       public void run()
       {
          // Task statements go here
          . . .
       }
    }

previous | start | next