Skip to content

Instantly share code, notes, and snippets.

@jasmine-k
Last active March 26, 2018 11:43
Embed
What would you like to do?
private static void thenCompose() {
CompletableFuture<String> completableFuture =
CompletableFuture.supplyAsync(() -> "Hello")
.thenCompose(value ->
CompletableFuture.supplyAsync(
() -> value + " Knolders! Its thenCompose"));
completableFuture.thenAccept(System.out::println); // Hello Knolders! Its thenCompose
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment