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

What does this combination compute and on which result does it complete?

CompletableFuture<Integer> a = CompletableFuture.supplyAsync(() -> 2); CompletableFuture<Integer> b = CompletableFuture.supplyAsync(() -> 3); CompletableFuture<Integer> c = a.thenCombine(b, (x, y) -> x * y);