📄 accounttime.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 + -