September 2005
Beginner
576 pages
13h 6m
English
This might be a surprise to you, but your Java objects are ideally suited for childbearing. When you create a program as an object—a set of attributes and behavior—you have designed something that's ready to pass on these qualities to offspring. Like most offspring, these child objects will take on a lot of the attributes and behavior of their parent. They also can do some things differently than their parent does; some extra attributes and behavior can be added that dad is incapable of.
This system is called inheritance, and it's something every superclass (parent) gives to its subclasses (children). Inheritance is one of the most useful aspects of object-oriented programming, and you'll be learning ...
Read now
Unlock full access