Skip to content
Sharp

Java Threading · interview question

In which scenario would a ScheduledThreadPoolExecutor be preferred over a FixedThreadPool?

Multiple choiceHardchapter-15-curatedpremiumjava-threadingexecutorservice
Choose one answer
Answer and explanation

Correct answer

D. When tasks need to be executed at fixed intervals

Why

A ScheduledThreadPoolExecutor is ideal for tasks that need to be executed periodically or after a specific delay. It supports scheduling tasks with fixed-rate or fixed-delay policies, which is not possible with a FixedThreadPool.

Test yourself on Java Threading

A free test with instant, explained results. No account needed.

Start free test
All Java Threading questions →