【初心者】Java質問・相談スレ20【大歓迎】
■ このスレッドは過去ログ倉庫に格納されています
0673デフォルトの名無しさん
NGNGclass countDown implements Runnable {
private int n;
private int pause; // in seconds
countDown(int p, int t){
n = p; pause = t;
}
public void run() {
for (int j = n;j > 0;j = j - 1) {
System.out.println(j,4);
try {
Thread.sleep(pause);
} catch(InterruptedException e) {return;}
}
■ このスレッドは過去ログ倉庫に格納されています