系統版本:windows10
java switch支援的有:char、byte、short、int 和 Character、Byte、Short、Integer 和 String,表達式的值不能是null,否則會在執行時拋出NullPointerException,在case子句中也不能使用null,否則會出現編譯錯誤。