@@ -0,0 +1,762 @@
+package sample.jcu.threadpool;%0A%0Aimport java.util.TimerTask;%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.ScheduledExecutorService;%0Aimport java.util.concurrent.ThreadPoolExecutor;%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * @author soyona%0A * @Package sample.jcu.threadpool%0A * @Desc:%0A * @date 2018/8/14 21:42%0A */%0Apublic class StudyScheduledThreadPoolExecutor %7B%0A%0A   static class Mytask extends TimerTask%7B%0A        @Override%0A        public void run() %7B%0A            System.out.println(%22d%22);%0A        %7D%0A    %7D%0A%0A%0A    public static void main(String%5B%5D args) %7B%0A        ScheduledExecutorService pool = Executors.newScheduledThreadPool(2);//%E5%90%AF%E7%94%A82%E4%B8%AA%E7%BA%BF%E7%A8%8B%0A        TimerTask t1 = new Mytask();%0A        pool.scheduleAtFixedRate(t1,0,2, TimeUnit.SECONDS);%0A    %7D%0A%7D%0A

add ScheduledThreadPoolExecutor