From 877c43f8242b88447d0234400c6e9b5c7586b558 Mon Sep 17 00:00:00 2001 From: LIU Date: Tue, 17 Nov 2020 19:26:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85switch=E7=9A=84=E4=BD=BF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "notes/Java \345\237\272\347\241\200.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/notes/Java \345\237\272\347\241\200.md" "b/notes/Java \345\237\272\347\241\200.md" index 5f31cec6..be21892f 100644 --- "a/notes/Java \345\237\272\347\241\200.md" +++ "b/notes/Java \345\237\272\347\241\200.md" @@ -406,7 +406,7 @@ switch (s) { } ``` -switch 不支持 long,是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断,如果值过于复杂,那么还是用 if 比较合适。 +switch 不支持 long、float、double,是因为 switch 的设计初衷是对那些只有少数几个值的类型进行等值判断,如果值过于复杂,那么还是用 if 比较合适。 ```java // long x = 111; -- GitLab