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

📄 twothread.java

📁 递归子程序法:对应每个非终结符语法单元编一个独立的处理过程(或子程序)。语法分析从读入第一个单词开始
💻 JAVA
字号:
	package twothread;
	/** 
	 * Java语言实验参考程序
	 * Company 北京师范大学计算机系 
	 * @author 孙一林
	 * @version 1.0
	 */
		public class TwoThread {
   			public static void main(String args[]) {
      			DelayPrintThread thread1,thread2;
				thread1 = new DelayPrintThread();		// 创建2个线程对象
				thread2 = new DelayPrintThread();
				thread1.start();						// 开始启动2个线程
				thread2.start();
				try {
					Thread.sleep( 10000 );				// 主线程休眠1万毫秒
				}
				catch(InterruptedException e) {
					System.out.println( "thread has wrong" );
				} 
			}
		}

⌨️ 快捷键说明

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