Which type of ExecutorService supports the execution of tasks after a fixed delay?
A.
DelayedExecutorService
B.
ScheduledExecutorService
C.
TimedExecutorService
D.
FixedExecutorService
E.
FutureExecutorService
Explanation:
The ScheduledExecutorService interface supplements the methods of its parent ExecutorService
withschedule, which executes a Runnable or Callable task after a specified delay. In addition, the
interface definesscheduleAtFixedRate and scheduleWithFixedDelay, which executes specified
tasks repeatedly, at definedintervals.
Note:The java.util.concurrent package defines three executor interfaces:
*Executor, a simple interface that supports launching new tasks. *ExecutorService, a subinterface
of Executor,which adds features that help manage the lifecycle, both of the individual tasks and of
the executor itself.
*ScheduledExecutorService, a subinterface of ExecutorService, supports future and/or periodic
execution oftasks.
Reference: The Java Tutorials,Executor Interfaces
A
B – The ScheduledExecutorService interface supplements the methods of its parent ExecutorService with schedule, which executes a Runnable or Callable task after a specified delay. In addition, the interface defines scheduleAtFixedRate and scheduleWithFixedDelay