Java Programming Introductory Tutorial--Using Enumeration Classes

       The enumeration type is a data type of a constant collection, and the enumeration constant can be used in any place where the constant can be used, such as the case label in the switch statement, and the control enhanced for statement.


A sample program using an enumeration type         in a switch statement.

 

 

Guess you like

Origin blog.csdn.net/u010764893/article/details/131124456