Copyright © 2001 Qusay H. Mahmoud
10
Creating and Starting Threads
lThe other way of creating a thread in Java is
–By implementing the Runnable interface
–class MyThread implements Runnable {
–   public void run() {
–      ….
–   }
–   public static void main(String argv[]) {
–      MyThread s = new MyThread();
–      Thread t1 = new Thread(s);
–       t1.start();
–   }
–}