mirror of
https://github.com/CyC2018/CS-Notes.git
synced 2025-07-10 13:37:35 +08:00
Update Java 基础.md
This commit is contained in:
@ -317,7 +317,7 @@ switch (s) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
switch 不支持 long,是因为 swicth 的设计初衷是为那些只需要对少数的几个值进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
|
switch 不支持 long,是因为 switch 的设计初衷是为那些只需要对少数的几个值进行等值判断,如果值过于复杂,那么还是用 if 比较合适。
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// long x = 111;
|
// long x = 111;
|
||||||
|
Reference in New Issue
Block a user