package com.hfxt.p4;
public class ThreadTest {
public static void main(String[] args) {
System.out.println("等待...");
//阻塞(等待)时间用Thread.sleep方法
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("继续...");
}
}
指定线程延迟时间(毫秒)
最新推荐文章于 2021-12-10 17:07:22 发布