from the API:
This is the common base class of all Java language enumeration types.
It is a base class which defines among other things a base Type, but it has no meaning on its own and hence requires a class to extend it to provide a real purpose.
An abstract class doesn't have to include abstract methods, it is just common to see that.
Joined: Mar 22, 2011
thanks for the response.I feel the enums are somewhat confusing.I need one more clarification regarding enums.Why static methods cannot be declared in a constantspecific class body of the enum constants
Prasad Posani wrote:Why static methods cannot be declared in a constantspecific class body of the enum constants
What would it mean? Why would you need it?
By "constantspecific class body", I assume you mean the code (if any) associated with one particular instance of an enum class. Like
Why would you ever need or want to put a static method inside the places associated with specific instances? The point of the "static" keyword is that it's not associated with any instance. It's contradictory.