62,614
社区成员
发帖
与我相关
我的任务
分享
import java.text.*;
public class Test {
public static void main(String... a) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
for(int i=0; i<100; i++) {
System.out.print("\r当前时间:" + format.format(new java.util.Date()));
try {
Thread.sleep(1000);
} catch (Exception e) {}
}
}
}
public class Test {
public static void main(String... a) {
for(int i=0; i<100; i++) {
System.out.print("\b" + i);
try {
Thread.sleep(1000);
} catch (Exception e) {}
}
}
}