package com.lxxu.testthread;
class MyThread6 implements Runnable{//线程的主体类
@Override
public void run(){//线程的主体方法
System.out.println(Thread.currentThread().getName());
}
}
public class ThreadDemo6{
public static void main(String[] args){
MyThread6 mt = new MyThread6();
new Thread(mt,"线程A").start();
mt.run(); // run方法也是一个线程
}
}