Skip to content

Instantly share code, notes, and snippets.

Last active March 26, 2018 11:43
What would you like to do?
private static void thenCompose() {
CompletableFuture<String> completableFuture =
CompletableFuture.supplyAsync(() -> "Hello")
.thenCompose(value ->
() -> 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