Aug
          11
          2016
        Enums
          By abernal          
              
       
    Enums are classes
That represents an enumeration which is like a fixed set of constants.
- Provides type-safe checking
 - Is impossible to create an invalid enum type without a compile error
 
A good example for enums are
- Days of the week
 - Months of the year
 - The cards in a deck
 
Sample
public enum Day {
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY
}
Usage
 