Chapter 8. Classes and Objects: A Deeper Look
Instead of this absurd division into sexes, they ought to class people as static and dynamic.
Is it a world to hide virtues in?
But what, to serve our private ends, Forbids the cheating of our friends?
This above all: to thine own self be true.
Don’t be “consistent,” but be simply true.
—Oliver Wendell Holmes, Jr.
In this chapter you’ll learn:
• Encapsulation and data hiding.
• To use keyword
• To use
static variables and methods.
• To import
static members of a class.
• To use the
enum type to create sets of constants with unique identifiers.
• To declare
enum constants with parameters.
• To organize ...