Skip to content
Sharp

Java Threading · interview question

What could be a potential downside of using a CachedThreadPool for handling a large number of short-lived tasks?

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

Correct answer

D. Risk of creating too many threads simultaneously.

Why

CachedThreadPool creates new threads as needed, potentially leading to a large number of concurrent threads and high resource consumption if tasks are short-lived and numerous.

Test yourself on Java Threading

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

Start free test
All Java Threading questions →