Question: how enumeration works in java?
Answer: Java Enumeration as a Class We can declare a constructor, define member variables and methods, and even implement an interface. When we create an enumeration constant, an object of that type actually is created. When the constructor is invoked, the enumeration constants are initialized.