Each thread is associated with an instance of the Thread class. There are three main ways to define and start a thread: provide a Runnable object, subclass Thread, or use an Executor interface. The Runnable interface represents a task that can be executed by a thread and defines a run method with no arguments. Starting the thread causes the run method to be called in a separately executing thread. Runnable objects are more general than subclassing Thread because they can implement interfaces other than Thread. However, subclassing Thread is easier for simple applications. The Executor interface provides a way to decouple task submission from how the tasks are scheduled and run. Thread.sleep causes the current thread to suspend execution for a specified period,