Enums in inner classes

Declaring Enums in a non-static inner class is explicitly disallowed by the JLS. This is because a nested enum type is implicitly static.

I’m trying to find out why.

1. Declare inner class as static.
2. Move Enum to outer class/top-level class.

Leave a Reply

Your email address will not be published. Required fields are marked *