Java-Switch with Enumeration

Switch with Enumeration An enumeration value can also be used to control a switch statement. Of course, all of the case statements must use constants from the same enum as that used by the switch expression. For example, in the following program, notice that in the case statements, the names of the enumeration constants are used without being … Read more…