The Quintessential Thread There are two ways to declare a thread. The first way is to declare a class that extends Thread. Here is an example followed by code used to create and start the thread. class BasicThread1 extends Thread { public void run() { // This method is called when the thread runs. } } Thread thread = new BasicThread1(); thread.start(); The second way is to have a class implement Runnable. This method is typically used when a class makes use of a thread that is not shared with other classes. This example demonstrates the typical way in which such classes declare, create, and start a thread. class BasicThread2 implements Runnable { public void run() { // This method is called when the thread runs. } public void aMethod() { // Create and start a thread. Thread thread = new Thread(this); thread.start(); } }