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.
- Mar 26 Mon 2012 09:47
-
Pausing Execution with Sleep in java
請先 登入 以發表留言。