Skip to content

Instantly share code, notes, and snippets.

@ova2
Last active May 22, 2021 14:53
Show Gist options
  • Save ova2/9efc504b7375e7767987a0324786440e to your computer and use it in GitHub Desktop.
Save ova2/9efc504b7375e7767987a0324786440e to your computer and use it in GitHub Desktop.
String result = CompletableFuture.supplyAsync(() -> "1 + 2 = " + (1 + 2)).get();
System.out.printl(result);
// Output
1 + 2 = 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment