thread1.java
来自「java netbeans 学习程序合集」· Java 代码 · 共 35 行
JAVA
35 行
/*
* Thread1.java
*
* Created on 2007年11月13日, 下午8:35
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package org.Adam;
/**
*
* @author Administrator
*/
public class Thread1 {
/** Creates a new instance of Thread1 */
public Thread1() {
}
public static void main(String[] args) {
new TestThread().run();
while(true){
System.out.println("main thread is running");
}
}
}
class TestThread {
public void run(){
while(true){
System.out.println(Thread.currentThread().getName()+" is running");
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?