This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
sharma ishu wrote:But we cannot say like: new EnumType();
So, what difference does it make that what access modifier is used for the constructor.
Look at it the other way: since you can't go new EnumType(), what possible reason could there be to have a public or protected constructor? There's a general tendency in the design of Java to disallow things that don't make sense.
It seems enums are used to declare a fixed set of meaningful constants. so, it doesn't allow creations of enums dynamically at runtime by restricting using access specifier. enums are static and compile.