哥哥姐姐们,帮帮弟弟,这个异常到底咋回事,第一行异常太长了,我复制粘贴在下面:Exception i

哥哥姐姐们,帮帮弟弟,这个异常到底咋回事,第一行异常太长了,我复制粘贴在下面:Exception in thread "main" java.util.concurrent.RejectedExecutionException: Task xianchengchi.TestCombine02$1@70dea4e rejected from java.util.concurrent.ThreadPoolExecutor@5c647e05[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
  public static ExecutorService newSingleThreadExecutor() {
        return new FinalizableDelegatedExecutorService
            (new ThreadPoolExecutor(1, 1,
                                    0L, TimeUnit.MILLISECONDS,
                                    new LinkedBlockingQueue<Runnable>()));
    }

这个自带的线程池只支持创建一个线程,你循环创建多个不行的。你改成i<=1; 建议使用ThreadPoolExexutor,自己初始化线程池数量。

代码贴出来嘛