Chapter 6: Reusing classes
The concept of inheritance is standard in virtually all OOP languages. It’s a way to
take an existing class and add to its functionality (as well as change it, the subject of
Chapter 7). Inheritance is often a way to reuse code by leaving the “base class” the
same, and just patching things here and there to produce what you want. However,
inheritance isn’t the only way to make new classes from existing ones. You can also
embed an object inside your new class with composition. In this chapter you’ll learn
about these two ways to reuse code in Java, and how to apply them.
Wednesday, July 23, 2008
Chapter 6: Reusing classes
Labels: Chapters in Java
Posted by Ganesh Kumar Devarasetty at 11:39 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment