Java_18_三大結構_多選擇結構_switch_case穿透

Switch多選擇結構 根據表達式值的不同執行許多不同的操作 Switch語句:case標籤必須是整數(byte、short、char、int)或者枚舉,不能是字符串。 【JDK7.0可以使用字符串】 等值判斷可以使用Switch double d=Math.random(); int e=(int)(d*6)+1; switch(e){ case 6: System.out.println("6
相關文章
相關標籤/搜索