?? simplethread.java
字號:
public class SimpleThread extends Thread {
private int countdown=5;
private int threadnumber;
private static int threadcount=0;
public SimpleThread(){
threadnumber=++threadcount;
System.out.println("marking"+threadnumber);
}
public void run(){
while(true){
System.out.println("thread"+threadnumber+"("+countdown+")");
if(--countdown==0)return;
}
}
public static void main(String[] args){
for(int i=0;i<5;i++)
new SimpleThread().start();
System.out.println("All threads started");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -