Skip to content

Commit f25cdad

Browse files
authored
Update java8-common-new-features.md
fix typo
1 parent e4d3671 commit f25cdad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/new-features/java8-common-new-features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ForkJoinPool.commonPool-worker-9>>2
510510
>
511511
> 正例:使用 JDK8Optional 类来防止 NPE 问题。
512512

513-
他建议使用 `Optional` 解决 NPE(`java.lang.NumberFormatException`)问题,它就是为 NPE 而生的,其中可以包含空值或非空值。下面我们通过源码逐步揭开 `Optional` 的红盖头。
513+
他建议使用 `Optional` 解决 NPE(`java.lang.NullPointerException`)问题,它就是为 NPE 而生的,其中可以包含空值或非空值。下面我们通过源码逐步揭开 `Optional` 的红盖头。
514514

515515
假设有一个 `Zoo` 类,里面有个属性 `Dog`,需求要获取 `Dog` 的 `age`。
516516

0 commit comments

Comments
 (0)