[ISSUE] Wrong example code in https://www.baeldung.com/java-completablefuture
Closed this issue · 1 comments
lovelock commented
Article and Module Links
https://www.baeldung.com/java-completablefuture
Describe the Issue
CompletableFuture<String> completableFuture
= CompletableFuture.supplyAsync(() -> "Hello")
.thenCombine(CompletableFuture.supplyAsync(
() -> " World"), (s1, s2) -> s1 + s2));
There should not be the last close parentheses.
Expected Behavior
CompletableFuture<String> completableFuture
= CompletableFuture.supplyAsync(() -> "Hello")
.thenCombine(CompletableFuture.supplyAsync(
() -> " World"), (s1, s2) -> s1 + s2);
Screenshots
ulisseslima commented