📄 main.java
字号:
/*
* Main.java
*
* Created on 2007年3月20日, 下午2:29
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package primethread;
import primethread.Prime;
/**
*
* @author 新
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args){
// TODO code application logic here
Prime prime1=new Prime(1,20000);
Prime prime2=new Prime(20001,40000);
Prime prime3=new Prime(40001,60000);
Prime prime4=new Prime(60001,80000);
Prime prime5=new Prime(80001,100000);
Thread thread1=new Thread(prime1,"线程1");
Thread thread2=new Thread(prime2,"线程2");
Thread thread3=new Thread(prime3,"线程3");
Thread thread4=new Thread(prime4,"线程4");
Thread thread5=new Thread(prime5,"线程5");
thread1.start();
thread2.start();
thread3.start();
thread4.start();
thread5.start();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -