⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testfirstthread.java

📁 国外的数据结构与算法分析用书
💻 JAVA
字号:
/**	A simple class to test class FirstRunnable.  It creates three instances of
	FirstThread, and lets them run for half a second, then stops their running
	so they can display their result. */
public class TestFirstThread
{
	public static void main(String[] args) throws InterruptedException
	{
		FirstThread f1 = new FirstThread();
		FirstThread f2 = new FirstThread();
		FirstThread f3 = new FirstThread();

		f1.start();
		f2.start();
		f3.start();

		Thread.sleep(500); // can throw an exception
		FirstThread.running = false;
		Thread.sleep(2000); // can throw an exception
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -