子线程join()的疑问!join后子线程还是并发的么?
我写了一个程序,对某个servlet发送xml做压力测试。 
 主线程起来后,起10个子线程,每个子线程对目标发送POST请求,是并发的。   
 我现在要在主线程里面统计10个并发线程都发完后,程序执行所用的时间,用了join()方法,让子线程join到父线程中来,但是这样做以后,发现10个子线程不是并发的了,而是顺序执行。也就是说先起的子线程先跑完再跑第2个子线程。   
 代码:   
       public   static   void   main(String[]   args)   {   
             long   startMillis   =   System.currentTimeMillis(); 
             System.out.println(new   Date()   +    "   -   Firing   Now   ! ");   
             for   (int   i   =   0;   i    <   10;   i++)   { 
                   Thread   fire   =   new   Thread(new   Gun(args[1],   args[2],   i)); 
                   fire.start(); 
                   fire.join(); 
             }   
             System.out.println(new   Date()   +    "   -   Fired   for    "   + 
                                                                      (System.currentTimeMillis()   -   startMillis) 
                                                                      +    "   ms "); 
       }
------解决方案--------------------谁能讲讲为什么?
------解决方案--------------------在你的第一段代码中,当在主线程中调用 fire[i].join();方法时,主线程会等到fire[i].run()方法返回时再继续执行下一行代码,也就是说在第一个线程被join,并且未从run方法返回,第二个线程是不会start的,所以会出现你说的那种情况。 
  看看下面的代码: 
 public class Test 
 {   
 	public static void main(String[] args)throws Exception 
 	{ 
 			Thread thread=new Thread(new Runnable() 
 			{ 
 				 	public void run() 
 				  	{ 
 				  		try 
 				  		{ 
 				  			Thread.sleep(1000); 
 				  		}catch(Exception e) 
 				  		{ 
 				  			e.printStackTrace();	 
 				  		}  				  		 
 				  		System.out.println(Thread.currentThread().getName());	  				  
 				  	} 
 			}); 
 			thread.start();  			 
 			thread.join(); 
 			System.out.print( "hello "); 
 	}   
 }   
 结果是:先打印Thread-0然后打印hello,事实上不论你把这句Thread.sleep(1000);中的参数设多大,结果都是一样的。 
 呵呵,这下你应该明白了吧?