当前位置: 技术问答>java相关
线程组的问题???????????(高分)
来源: 互联网 发布时间:2015-02-21
本文导语: public class Thread1{ public static void main(String[] args){ ThreadGroup a=new ThreadGroup("a"); ThreadGroup b=new ThreadGroup(a,"b"); Thread x=new Thread(a,"thread x"); Thread y=new Thread(b,"thread y"); Thread[] all=new ...
public class Thread1{
public static void main(String[] args){
ThreadGroup a=new ThreadGroup("a");
ThreadGroup b=new ThreadGroup(a,"b");
Thread x=new Thread(a,"thread x");
Thread y=new Thread(b,"thread y");
Thread[] all=new Thread[a.activeCount()];
a.enumerate(all);
for(int i=0;i
public static void main(String[] args){
ThreadGroup a=new ThreadGroup("a");
ThreadGroup b=new ThreadGroup(a,"b");
Thread x=new Thread(a,"thread x");
Thread y=new Thread(b,"thread y");
Thread[] all=new Thread[a.activeCount()];
a.enumerate(all);
for(int i=0;i