Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CompletableFuture<String> promise = CompletableFuture.runAsync(() -> "hello");
- promise.thenApply(result -> {
- System.out.println("Task result was " + result);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement