Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CompletableFuture<Integer> computeAnother(Integer i){
- return CompletableFuture.supplyAsync(() -> 10 + i);
- }
- CompletableFuture<Integer> finalResult = compute().thenCompose(this::computeAnother);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement