前日研究Java線程問題
class ThreadA extends Thread{
int count =
public void run(){
System
while (!this
System
try{
Thread
}catch(InterruptedException e){ // 退出阻塞態時將捕獲異常
System
this
}
}
System
}
}
class ThreadDemo
public static void main(String argv[]) throws InterruptedException{
ThreadA ta = new ThreadA();
ta
ta
Thread
System
ta
}
}
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27604.html