Skip to content

Instantly share code, notes, and snippets.

@babjo
Created November 26, 2017 15:32
Show Gist options
  • Save babjo/3a2338c980596027b9ef809ea1eb70c8 to your computer and use it in GitHub Desktop.
Save babjo/3a2338c980596027b9ef809ea1eb70c8 to your computer and use it in GitHub Desktop.
CompletableFuture future = CompletableFuture.supplyAsync(() -> "Hello")
.thenAcceptBoth(CompletableFuture.supplyAsync(() -> " World"),
(s1, s2) -> System.out.println(s1 + s2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment