優(yōu)點(diǎn)進(jìn)階3期訓(xùn)練營
2022-11-12 17:19 作者:bili_1559000721 | 我要投稿
import java.util.Random;import java.util.concurrent.CountDownLatch;public class Main {
?public static void main(String[] args) throws InterruptedException {
? ?CountDownLatch latch = new CountDownLatch(10);
? ?for (int i = 0; i < 10; i++) {
? ? ?int finalI = i;
? ? ?new Thread(() -> {
? ? ? ?int second = new Random().nextInt(10);
? ? ? ?try {
標(biāo)簽: