Enum Types
An enum type is a special data type that enables for a variable to be a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. Common examples include compass directions (values of NORTH, SOUTH, EAST, and WEST) and the days of the week.
package enumdatatype; public class EnumDatatype { public enum Days {Mon,Tue,Wed,Thu,Fri,Sat,Sun}; public static void main(String[] args) { System.out.println("The Off day is : "+ Days.Sun); System.out.println("The half off day is: "+Days.Fri); } }