Skip to content

Commit

Permalink
再补个句号
Browse files Browse the repository at this point in the history
  • Loading branch information
Yue-plus authored Dec 24, 2022
1 parent 942ac85 commit bfc7ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/new-features/java12-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Java12 为默认的垃圾收集器 G1 带来了两项更新:

#### 增强 Switch

传统的 `switch` 语法存在容易漏写 `break` 的问题,而且从代码整洁性层面来看,多个 break 本质也是一种重复
传统的 `switch` 语法存在容易漏写 `break` 的问题,而且从代码整洁性层面来看,多个 break 本质也是一种重复

Java12 增强了 `switch` 表达式,使用类似 lambda 语法条件匹配成功后的执行块,不需要多写 break 。

Expand Down

0 comments on commit bfc7ad1

Please sign in to comment.