2023年11月26日
摘要: 概述 在多线程执行任务时,可以使用线程池执行任务。 相关代码如下: public static void main(String[] args) { ThreadPoolExecutor executor=null; try{ executor = new ThreadPoolExecutor(2, 阅读全文
posted @ 2023-11-26 12:18 自由港 阅读(20) 评论(0) 推荐(0) 编辑