package com.larry.test;
enum Enum{
RED, BLUE
}
public class Test1 {
public static void main(String[] args) {
char c = 0;
byte b = 0;
short s = 0;
int i = 0;
long l = 0;//
switch (Enum.RED) {
}
}
//可以看出switch中的语句可以是int(包括可以隐式转化为int的byte、short,但不包括long)、char、枚举类型。
}