标签:ati system span ack 多线程 set start string runnable
public class Demo02 {
public static void main(String[] args) {
Test01();
new Thread(){
public void run(){
System.out.println(getName()+".......ccccccccccc");
}
}.start();
new Thread( new Runnable(){
public void run(){
//Thread.currentThread()获取当前正在执行的线程
System.out.println(Thread.currentThread().getName()+"dddddddddd");
}
}).start();
System.out.println(Thread.currentThread().getName());//获取主线程的名字
Thread.currentThread().setName("我是主线程");
System.out.println(Thread.currentThread().getName());//再次获取主线程的名字
}
标签:ati system span ack 多线程 set start string runnable
原文地址:https://www.cnblogs.com/wangffeng293/p/13347928.html