On your own, you might take nine months to discover and understand
polymorphism, a cornerstone of OOP. Through small, simple examples you’ll see
how to create a family of types with inheritance and manipulate objects in that
family through their common base class. Java’s polymorphism allows you to treat
all objects in this family generically, which means the bulk of your code doesn’t rely
on specific type information. This makes your programs extensible, so building
programs and code maintenance is easier and cheaper. In addition, Java provides a
third way to set up a reuse relationship through the interface, which is a pure
abstraction of the interface of an object. Once you’ve seen polymorphism, the
interface can be clearly understood. This chapter also introduces Java 1.1 inner
classes.
Monday, July 28, 2008
Chapter 7: Polymorphism
Posted by Ganesh Kumar Devarasetty at 9:40 AM
Labels: Introduction
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment