CS 342 - 2/16/16 Thread work "up to a point" because of Java's single inheritance model. So the interface of Runnable is used as the solution: class PrimeRun extends ClassX implements Runnable { long minPrime; // data need inside of run() PrimeRun(long minPrime) { this.minPrime = minPrime; } public void run() { // compute primes larger than minPrime . . . } } To start a runnable class: The following code would then create a thread and start it running: PrimeRun p = new PrimeRun(143); Thread myThread = new Thread(p); myThread.start(); // once the Thread gets started, the code will begin // execution in the run() method of the PrimeRun class