Skip to content

Instantly share code, notes, and snippets.

Created April 26, 2020 09:40
What would you like to do?
private static void demoThenAccept() {
CompletableFuture<String> completableFuture = CompletableFuture.supplyAsync(() -> {
System.out.println("Task Running inside completable Future");
return "returned result";
CompletableFuture<Void> secondCompletableFuture = completableFuture.thenAccept(result -> {
System.out.println("I am the "+result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment