Documentation

The Java™ Tutorials
Hide TOC
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy