Why can’t enum constructors be protected or public in Java?

Think of Enums as a class with a finite number of instances. There can never be any different instances beside the ones you initially declare.

Thus, you cannot have a public or protected constructor, because that would allow more instances to be created.

Note: this is probably not the official reason. But it makes the most sense for me to think of enums this way.

Leave a Comment