Skip to content
Sharp

Java Threading · interview question

Which method in ExecutorService can be used to attempt a graceful shutdown, allowing current tasks to complete before termination?

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

Correct answer

A. Shutdown()

Why

The shutdown() method attempts a graceful shutdown where the ExecutorService stops accepting new tasks but allows currently executing tasks to finish.

Test yourself on Java Threading

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

Start free test
All Java Threading questions →