Java: using switch statement with enum under subclass
Wrong:
case AnotherClass.MyEnum.VALUE_A
Right:
case VALUE_A:
Change it to this:
switch (enumExample) {
case VALUE_A: {
//..
break;
}
}
The clue is in the error. You don't need to qualify case
labels with the enum type, just its value.