switch只能作用于整数表达式或者枚举常量。 整数表达式可以是int基本类型或Integer包装类型,byte,short,char可以隐式转为int; long和String不能作用于switch语句中。