How do I create an enumeration?
Created Sep 11, 2005
John Zukowski Starting in Java 5, you can use the new
enum keyword, where you would specify a class or interface. For instance, for a enumeration of suits from a deck of cards, you might use: public enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }.