1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

update java8-common-new-features.md

This commit is contained in:
jun 2023-08-05 15:38:27 +08:00
parent 9fbbdc679e
commit 832d5cb7e0

View File

@ -681,7 +681,7 @@ public static void main(String[] args) {
System.out.println("User's city without flatMap: " + cityWithoutFlatMap); System.out.println("User's city without flatMap: " + cityWithoutFlatMap);
} }
``` ```
`Stream``Optional`中正确使用flatMap可以减少很多不必要的代码。 `Stream``Optional`中正确使用`flatMap`可以减少很多不必要的代码。
### 判断 value 是否为 null ### 判断 value 是否为 null