Merge pull request #288 from zhangxuelong10/patch-1

Update Java 基础.md
This commit is contained in:
CyC2018
2018-06-21 19:28:24 +08:00
committed by GitHub

View File

@ -317,7 +317,7 @@ switch (s) {
}
```
switch 不支持 long是因为 swicth 的设计初衷是为那些只需要对少数的几个值进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
switch 不支持 long是因为 switch 的设计初衷是为那些只需要对少数的几个值进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
```java
// long x = 111;