I see a weird situation and wonder if I missed something. I have one class define an enum like this
public class Foo { public enum Day { Monday, Tuesday, ...}; ... } Then in another class I have
public class Bar { Foo aFoo=new Foo(); void test(){ System.out.println(Foo.Day.Monday); // ok System.out.println(aFoo.Day.Monday); // complie error Day not accessible } } Anyone have an explanation for this? Thanks.