You are allowed to have enum fields/methods that are specific to each item like this in java
enum E {
A {
public int a = 3;
},
B {
public void x() {}
};
}
But you are not allowed to do this:
int x = E.A.a; // cannot resolve symbol 'a'
E.B.x() // cannot resolve method 'x'
Why is this not allowed?