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() + "正在运行!"); }}
添加回答
举报
0/150
提交
取消