The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Learning the Java Language
Lesson: Classes and Inheritance

Questions and Exercises: Enumerated Types

Exercises

  1. Rewrite the class Card from the exercise in Questions and Exercises: Creating Classes (in the Learning the Java Language trail) so that it represents the rank and suit of a card with enum types.

  2. Rewrite the Deck class.

Check your answers. (in the Learning the Java Language trail)


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.