Trail: Learning the Java Language
Lesson: Classes and Objects
Questions and Exercises
Home Page > Learning the Java Language > Classes and Objects
Questions and Exercises: Enum Types

Exercises

  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.

  2. Rewrite the Deck class.

Check your answers.

Previous page: Enum Types
Next page: Annotations

Discuss
We welcome your participation in our community. Please keep your comments civil and on point. You may optionally provide your email address to be notified of replies — your information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.