runtime.getruntime.availableprocessors时间:2023-11-23 11:03:381:获取cpu核心数: Runtime.getRuntime().availableProcessors(); 创建线程池: Executors.newFixedThreadPool(nThreads);//nThreads为线程数2: