/* * Example showing how to use Enumerated Types */ public class DaysOfWeek { public static enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } public void thoughts(Day day) { String thoughts; switch (day) { case SUNDAY: thoughts = "Day of rest."; break; case MONDAY: thoughts = "Rough day."; break; case TUESDAY: thoughts = "Getting better."; break; case FRIDAY: thoughts = "The evening will be great."; break; default: thoughts = "No thoughts."; } System.out.println(thoughts); } public static void main(String[] args) { DaysOfWeek d = new DaysOfWeek(); d.thoughts(Day.SUNDAY); } }