I am curious why my answer was deleted to this question? Looking at the FAQ section, I do not see which one it falls under. I was the first to answer so it can't be that my answer is too similar to others.
If someone could explain the rationale I would really appreciate it!
deleted by Robert Harvey♦ 28 mins ago Why was your post deleted? See the faq.
Here is the content of my answer:-
You definitely can switch on enums. An example posted from the java tutorials.
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } public class EnumTest { Day day; public EnumTest(Day day) { this.day = day; } public void tellItLikeItIs() { switch (day) { case MONDAY: System.out.println("Mondays are bad."); break; case FRIDAY: System.out.println("Fridays are better."); break; case SATURDAY: case SUNDAY: System.out.println("Weekends are best."); break; default: System.out.println("Midweek days are so-so."); break; } }