java 实现多个子线程执行完毕后,再执行主线程
public static void main(String[] args) throws InterruptedException { List<String> list = new ArrayList<>(); //1、 创建CountDownLatch 对象, 设定需要计数的子线程数目 final CountDownLatch latch=new CountDownLatch(3); System.out.println("主线程开始执行....