public PrimesThread(intnum) { if (num< 2) throw new IllegalArgumentException(); this.num = num; } public void run() {//定义run函数,实现run函数的代码被作为一个独立的线程执行 if(num>=2) System.out.print(\ for(int x=2;x public class Primes{ public static void main(String args[]) { if (args.length == 0) { System.out.println(\未传入参数args,请在arguments中设置参数\ System.exit(0); } else new Thread(new PrimesThread(Integer.parseInt(args[0]))).start(); } }
湖南大学操作系统作业(2)(2)
2020-06-21 16:10
湖南大学操作系统作业(2)(2).doc
将本文的Word文档下载到电脑
下载失败或者文档不完整,请联系客服人员解决!