Skip to content

Commit

Permalink
Merge pull request CyC2018#1015 from Xunzhuo/patch-1
Browse files Browse the repository at this point in the history
补充switch的使用
  • Loading branch information
CyC2018 authored Nov 17, 2020
2 parents 419e6d2 + 877c43f commit 0c65b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notes/Java 基础.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ switch (s) {
}
```

switch 不支持 long是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断如果值过于复杂那么还是用 if 比较合适
switch 不支持 longfloatdouble是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断如果值过于复杂那么还是用 if 比较合适

```java
// long x = 111;
Expand Down

0 comments on commit 0c65b30

Please sign in to comment.