Download the JDK
Search the Tutorials
Trail: Learning the Java Language
Lesson: Classes and Objects
Home Page > Learning the Java Language > Classes and Objects
Answers to Questions and Exercises: Enum Types

> ### Exercises

> Exercise 1: Rewrite the class `Card` from the exercise in Questions and Exercises: Classes so that it represents the rank and suit of a card with enum types.
> Answer 1: See `Card3.java`, `Suit.java`, and `Rank.java`.

> Exercise 2: Rewrite the `Deck` class.
> Answer 2: See `Deck3.java`.

Previous page: Questions and Exercises: Enum Types