try {
Thread.currentThread().sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
一行代碼就可以解決,本質上就是讓當前線程睡眠3秒。
try {
Thread.currentThread().sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
一行代碼就可以解決,本質上就是讓當前線程睡眠3秒。