Thread one is alive :true
Thread two is alive :true
Thread Three is alive :true
本来就在MAIN这个线程中在waiting for thread finnish的前面你为什么想着他们在后面出来?
Thread two is alive :true
Thread Three is alive :true
本来就在MAIN这个线程中在waiting for thread finnish的前面你为什么想着他们在后面出来?
去掉obx.t.join();后开辟了两个线程之后执行了一次,很是奇怪.
哪位大侠可以解答这个问题?
你好,我得问题是 :我觉得按照下面的程序:在初始化
NewThread ob1 = new NewThread("one");
NewThread ob2 = new NewThread("two");
NewThread ob3 = new NewThread("Three");
的时候应该先执行:for (int i=5;i>0 ;i-- )
{
System.out.println(name + ":" +i );
Thread.sleep(1000);
}
然后在执行: System.out.println("Thread one is alive :" + ob1.t.isAlive());
System.out.println("Thread two is alive :" + ob2.t.isAlive());
System.out.println("Thread Three is alive :" + ob3.t.isAlive());但是执行结果好像是反过来了?
怎么回事:?