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

📄 accounttime.java

📁 J2EE指南
💻 JAVA
字号:
package javaBeanClass;
public class AccountTime{
	int time=60;
	int offset=1000;
	AccountTimeThread accTime;
	public AccountTime(){
		accTime=new AccountTimeThread();
		accTime.start();
	}
	public int getTime(){
		return this.time;	
	}
	class AccountTimeThread extends Thread{
			public void run(){
				while(time!=0&&accTime!=null){
					time--;
					System.out.println (time);
					try{
						this.sleep(offset);	
					}
					catch(Exception e){
						System.out.println (e);		
					}	
				}	
			}
	}
	public static void main(String arge[]){
		AccountTime at = new AccountTime();
	}
}

⌨️ 快捷键说明

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