Enums
Last updated
Was this helpful?
Last updated
Was this helpful?
The class GameApp demonstrates the real benefit of all this enum business. Because the variable gameLevel (defined in class Game) is of type Level, you can assign only one of the constants defined in the enum Level—that is, Level.BEGINNER, Level.INTERMEDIATE, or Level.EXPERT.