?? eraser.java
字號:
package runnable;
public class Eraser implements Runnable{
private boolean active;
private String mask;
public Eraser(){
this('*');
}
public Eraser(char maskChar){
active=true;
mask="\010"+maskChar;
}
public void setActive(boolean active){
this.active=active;
}
public boolean isActive(){
return active;
}
public void run(){
while(isActive()){
System.out.print(mask);
try{
Thread.currentThread().sleep(50);
}
catch(InterruptedException e){
e.printStackTrace();
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -