示例代码:
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
示例代码:
public void sleep() throws InterruptedException {
Thread.sleep(1000);
}
示例代码:
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
示例代码:
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// do nothing
}
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>