JAVA多執行續簡單範例

public class ThreadTest2
{
   public static void main (String[] args){
      HelloThread t1 = new HelloThread();
      t1.setName("T1");
      t1.start();
      System.out.println("可用執行續:"+Thread.activeCount() + "條");
   }
}

來源:猛虎出閘雙劍合璧版