Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaExecutorService usageSingle-choice MCQ

Given a fixed thread pool of size 2 and tasks submitted via submit(), what happens to a task that throws an unchecked exception?

ExecutorService es = Executors.newFixedThreadPool(2); Future<?> f = es.submit(() -> { throw new RuntimeException("x"); });