>
系统版本:windows10
java switch支持的有:char、byte、short、int 和 Character、Byte、Short、Integer 和 String,表达式的值不能是null,否则会在运行时抛出NullPointerException,在case子句中也不能使用null,否则会出现编译错误。
图文推荐