Skip to content

Commit

Permalink
Merge pull request Snailclimb#1887 from Yue-plus/patch-1
Browse files Browse the repository at this point in the history
一个拼写错误
  • Loading branch information
Snailclimb authored Dec 26, 2022
2 parents 3d70481 + bfc7ad1 commit ce4a21f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/java/new-features/java12-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ Java12 为默认的垃圾收集器 G1 带来了两项更新:

#### 增强 Switch

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

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

```java
switch (day) {
Expand Down

0 comments on commit ce4a21f

Please sign in to comment.