O'Reilly logo

Java Gently, Third Edition by Judith Bishop

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 9. Abstraction and inheritance

Abstraction and inheritance

9.1 Class power

9.2 Inheritance

9.3 Abstraction through interfaces

9.4 Abstract methods and classes

9.5 Case Study 4: Veterinary Tags

9.5 Serialization

Object-oriented programming has several ways in which the use of classes is made more powerful. We have already been using classes extensively for what is known as composition, in other words, creating an object in a class based on another class. An example of this would be the array of batches kept in the Coffee class. Two other concepts that we shall now study are abstraction and inheritance.

Class power

Abstraction

Abstraction enables a class or method to concentrate ...

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