易百教程

298、ScheduledExecutorService 和 ExecutorService 接口有什么区别?

ExecutorServcie 和 ScheduledExecutorService 都是 java.util.Concurrent 包的接口,但 scheduleExecutorService 提供了一些额外的方法来延迟或每隔固定时间执行 Runnable 和 Callable 任务。