for (int i = 0; i < 10; i++) {
CompletableFuture<Void> cf1 = CompletableFuture.supplyAsync(() -> {
System.out.println("A");
return null;
});
CompletableFuture<Integer> cf2 = cf1.thenApply((result) -> {
System.out.println("B");
return null;
});
CompletableFuture<Integer> cf3 = cf2.thenApply((result) -> {
System.out.println("C");
return null;
});
}
```
标签:十次,输出,return,System,线程,println,CompletableFuture,null,out
From: https://www.cnblogs.com/fchhk-blog/p/17383156.html