public class SleepDemo {
public static void main(String[] args) throws InterruptedException {
for (int i = 10; i>=0; i--) {
Thread.sleep(1000); //1000毫秒就是1秒
System.out.println(i);
}
}
}
public static void main(String[] args) throws InterruptedException {
for (int i = 10; i>=0; i--) {
Thread.sleep(1000); //1000毫秒就是1秒
System.out.println(i);
}
}
}