O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 14 INHERITANCE

In this chapter, we introduce the inheritance relationship that may exist between classes. It is widely used in object-oriented applications and brings to our designs and programs a powerful feature unique to object orientation.

Inheritance (also known as specialization) is a way to form new classes using classes that have already been defined. The former, known as derived classes, inherit properties and behaviors of the latter, which are referred to as base classes. The terms parent class and child class as well as superclass and subclass are also used in this context. Inheritance is intended to help reuse existing code with little or no modification.

Inheritance is also called generalization. For instance, an account ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required