public class Test extends Thread{
public static void main(String[] args){
Test test = new Test();
new Thread(test,"线程一").start();
int a = Thread.activeCount();
System.out.println(a);
}
public void run(){
System.out.println(Thread.currentThread().getName() + "正在运行!");
}
}
四无小青年
相关分类