Skip to content

Commit

Permalink
Merge pull request #2193 from zouzanyan/patch-2
Browse files Browse the repository at this point in the history
Update java9.md
  • Loading branch information
Snailclimb authored Oct 26, 2023
2 parents cd267ee + 56e93ff commit 4ca9af2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/java/new-features/java9.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ try (scanner;writer) {

**什么是 effectively-final 变量?** 简单来说就是没有被 `final` 修饰但是值在初始化后从未更改的变量。

正如上面的代码所演示的那样,即使 `writer` 变量没有被显示声明为 `final`但它在第一次被复制后就不会改变了,因此,它就是 effectively-final 变量。
正如上面的代码所演示的那样,即使 `writer` 变量没有被显示声明为 `final`但它在第一次被赋值后就不会改变了,因此,它就是 effectively-final 变量。

## Stream & Optional 增强

Expand Down Expand Up @@ -258,4 +258,4 @@ System.out.println(currentProcess.info());
- New Features in Java 9:https://www.baeldung.com/new-java-9
- Java – Try with Resources:https://www.baeldung.com/java-try-with-resources

<!-- @include: @article-footer.snippet.md -->
<!-- @include: @article-footer.snippet.md -->

0 comments on commit 4ca9af2

Please sign in to comment.