class MyRunnable implements Runnable
{
public void run()
{
System.out.println("通过实现Runable接口方式创建线程");
}
}
public class ThreadTest2
{
public static void main(String[] args)
{
MyRunnable mr=new MyRunnable();
Thread thread=new Thread(mr);
thread.start();
}
}