Switch中的注意事项

  1. Switch语句中Switch(表达式),表达式的返回值必须是byte,short,int,char,enum[枚举],String
  2. case语句中必须是常量,不能是变量
  3. 需要写break