Что напечатает код, если
supplyAsync кинет исключение?CompletableFuture.supplyAsync(() -> {
throw new RuntimeException("Error");
})
.exceptionally(ex -> "Recovered")
.thenAccept(System.out::print);supplyAsync кинет исключение?CompletableFuture.supplyAsync(() -> {
throw new RuntimeException("Error");
})
.exceptionally(ex -> "Recovered")
.thenAccept(System.out::print);
2