Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. CompletableFuture<Integer> computeAnother(Integer i){
  2. return CompletableFuture.supplyAsync(() -> 10 + i);
  3. }
  4. CompletableFuture<Integer> finalResult = compute().thenCompose(this::computeAnother);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement