每一秒顯示一次系統時間
[html]
public class ClockThreadTest {
/**
* @param args
*/
public static void main(String[] args) {
ClockThread clockThread = new ClockThread()
clockThread
System
}
}
class ClockThread extends Thread {
@Override
public void run() {
super
while (true) {
System
try {
Thread
} catch (InterruptedException e) {
e
}
}
}
}
看出線程的具體體現了嗎
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27334.html