Skip to content

Instantly share code, notes, and snippets.

@jasmine-k
Created March 26, 2018 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasmine-k/409853a7ec2c3938e393d9751ea4981a to your computer and use it in GitHub Desktop.
Save jasmine-k/409853a7ec2c3938e393d9751ea4981a to your computer and use it in GitHub Desktop.
private static void thenAcceptBoth() {
CompletableFuture<Void> completableFuture = CompletableFuture.supplyAsync(() -> "Hello")
.thenAcceptBoth(CompletableFuture.supplyAsync(() -> " Knolders! Its thenAcceptBoth"),
(value1, value2) -> System.out.println(value1 + value2)); // Hello Knolders! Its thenAcceptBoth
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment