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

Given two independent CompletableFutures, what is the key behavioral difference between thenCompose and thenCombine?

CompletableFuture<Integer> a = CompletableFuture.supplyAsync(() -> 1); CompletableFuture<Integer> b = CompletableFuture.supplyAsync(() -> 2);