プログラムを中断するThread.sleep
指定した時間の長さにわたって現在のスレッドを中断します。
try{
Thread.sleep(3000); //3000ミリ秒Sleepする
}catch(InterruptedException e){}

Sample code collection
指定した時間の長さにわたって現在のスレッドを中断します。
try{
Thread.sleep(3000); //3000ミリ秒Sleepする
}catch(InterruptedException e){}