Copyright © 2001 Qusay H. Mahmoud
12
Putting a Thread to Sleep
lYou may pause a thread for a specific period of time by putting it to sleep using sleep()
–try {
–   Thread.sleep(4000); // 4 seconds
–} catch (InterruptedException ie) {
–   ie.printStackTrace();
–}
lThe argument to sleep specifies the number of milliseconds the thread will sleep for