This example illustrates a program that runs two threads. The CountDown class pauses every half second (500 milliseconds) by sleeping itself. The sleep method requires an integer of type long, thus the type cast, and it throws an InterruptedException which must be caught.