[ Web Proxy ]
URL:
Viewing: https://docs.oracle.com/javase/tutorial/java/javaOO/QandE/enum-questions.html [Back]  [Original]

Questions and Exercises: Enum Types (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
Documentation

The Java™ Tutorials
Questions and Exercises
Trail: Learning the Java Language
Lesson: Classes and Objects

Questions and Exercises: Enum Types

Questions

  1. True or false: an Enum type can be a subclass of java.lang.String.

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

Web Proxy Viewer  |  New URL  |  Original Page