在java中可有两种方式实现多线程,一种是继承Thread类,一种是实现Runnable接口,//继承thread类classPrimeThreadextendsThread{longminPrime;PrimeThread(longminPrime){this.minPrime=minPrime;}publicvoidrun(){//computerpri...
newThread(p).start();