Java多线程(二) —— join、线程的状态与synchronized
join 我们可以通过使用join() 方法来进行线程等待的操作: public class Demo2 {public static void main(String[] args) throws InterruptedException {Thread t1 new Thread(() -> {System.out.println("t1 线程启动");});Thread t2 new Thread(…
2026-02-10