public class TestThreadPool { //线程池维护线程的最少数量 private static final int COREPOOLSIZE = 2; //线程池维护线程的最大数量 private static final int MAXINUMPOOLSIZE = 5; //线程池维护线程所允许的空闲时间 private static final long KEEPALIVETIME = 4; //线程池维护线程所允许的空闲时间的单位 private static fi…