Understanding Enum in Java
Understanding Enum In Java: Enum is a shortcut for Enumeration, it is introduced in 1.5 version of java. If we want to represent a group named constants then we should go for Enum. The main aim of enum is to define our own data type i.e Enumerated Data Type. Java enum is much more powerful than other languages. Example: enum Week{ MON,TUE,WED,THR,FRI,SAT,SUN; } Here ; is optional. Internal Implementation of Enum: Every enum is internally implemented by using Class Concept. Every enum constant is " public static final " and each constant represents an object of type enum . enum Month{ class Month{ JAN, FEB; ====> ...