publicvoidrun() { // compute primes larger than minPrime . . . } } // The following code would then create a thread and start it running: PrimeThreadp=newPrimeThread(143); p.start();
publicvoidrun() { // compute primes larger than minPrime . . . } } // The following code would then create a thread and start it running: PrimeRunp=newPrimeRun(143); newThread(p).start();