How does this code not compile?
class A { class B { public enum Enum <-- this line { AD, BC } } }
Compiler Reports:
enum declarations allowed only in static contexts.
But then when I put Enum inside class A, everything is fine.
This is pretty amazing. I don't think I have this problem in C ++.
java enums
sivabudh
source share