Thread.sleep causes the current thread to suspend execution for a specified period.

//Pause for 5 seconds
Thread.sleep(5000);

InterruptedException is an exception that sleep throws when another thread interrupts the current thread while sleep is active.

mark528 發表在 痞客邦 PIXNET 留言(0) 人氣()