求解枚举的问题 为什么错我
public class lianxi8 {
public static void main(String[] args) {
ColorEnum colorEnum = ColorEnum.blue;
switch (colorEnum) {
case red:
System.out.println("color is red");
break;
case green:
System.out.println("color is green");
break;
case yellow:
System.out.println("color is yellow");
break;
case blue:
System.out.println("color is blue");
break;
}
}
}