Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaCompletableFuture compositionSingle-choice MCQ

In this composition, on which executor does the thenApply stage run?

ExecutorService pool = Executors.newFixedThreadPool(2); CompletableFuture<Integer> cf = CompletableFuture .supplyAsync(() -> 10, pool) .thenApply(x -> x * 2);