While文サンプル
while文は条件が真の間ループする制御文です。次のコードサンプルはThread.sleep(2000)で2秒間の待機を100回繰り返します。
int i=0;
while(i<100){
try {
Thread.sleep(2000);
}catch(InterruptedException e){
}
i++;
}

Sample code collection
while文は条件が真の間ループする制御文です。次のコードサンプルはThread.sleep(2000)で2秒間の待機を100回繰り返します。
int i=0;
while(i<100){
try {
Thread.sleep(2000);
}catch(InterruptedException e){
}
i++;
}