📄 testfirstrunnable.java
字号:
/** A simple class to test class FirstRunnable. It creates three instances of
FirstRunnable, and lets them run for half a second, then stops their running
so they can display their result. */
public class TestFirstRunnable
{
public static void main(String[] args) throws InterruptedException
{
FirstRunnable r1 = new FirstRunnable();
FirstRunnable r2 = new FirstRunnable();
FirstRunnable r3 = new FirstRunnable();
Thread.sleep(500); // can throw an exception
FirstRunnable.running = false;
Thread.sleep(2000); // can throw an exception
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -