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

📄 example9_8.java.bak

📁 不错的教程 适合中高级人员的使用
💻 BAK
字号:
import java.util.*;
public class Example9_8 
{  public  static void main(String args[])
   {
	  A a=new A();
	  a.thread.start();
    }
}
class A implements Runnable
{
	Thread thread;
	int n=0;
	A()
	{
		thread=new Thread(this);		
	}
	
	public void run()
	{   
		while(true)
		{	System.out.println(new Date());	
		 n++;
		 try{Thread.sleep(1000);}
		 catch(InterruptedException e){}
		 if(n==3)
			{
			 thread=new Thread(thuis);
			 thread.start();
		 }
		 if(n>=12)
			 return;	 
			
		}
	}
}

⌨️ 快捷键说明

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