/* * This is an example of using an enumerated types */ public class EnumEx { public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } public static void main(String[] args) { Day day; day = Day.TUESDAY; String thoughts; switch (day) { case SUNDAY: thoughts = "Day of rest."; break; case MONDAY: thoughts = "Rough day."; break; case TUESDAY: thoughts = "Getting better."; break; default: thoughts = "no thoughts."; } System.out.println(thoughts); } }