1> public class Mythread extends Thread{
@override
public void run(){
System.out.println("my extend thread");
}
} // new Mythread().start;
2>public class Mythread implements Runnable{
@override
public void run(){
System.out.println("my extend thread");
}
} new Thread(new MyThread()).start;