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.
沒有留言:
張貼留言