Skip to Content
Java: The Complete Reference, Eleventh Edition, 11th Edition
book

Java: The Complete Reference, Eleventh Edition, 11th Edition

by Herbert Schildt
December 2018
Intermediate to advanced
1248 pages
33h 55m
English
McGraw-Hill
Content preview from Java: The Complete Reference, Eleventh Edition, 11th Edition

CHAPTER

8

Inheritance

Inheritance is one of the cornerstones of object-oriented programming because it allows the creation of hierarchical classifications. Using inheritance, you can create a general class that defines traits common to a set of related items. This class can then be inherited by other, more specific classes, each adding those things that are unique to it. In the terminology of Java, a class that is inherited is called a superclass. The class that does the inheriting is called a subclass. Therefore, a subclass is a specialized version of a superclass. It inherits all of the members defined by the superclass and adds its own, unique elements.

Inheritance Basics

To inherit a class, you simply incorporate the definition of one class ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java: The Complete Reference, Twelfth Edition, 12th Edition

Java: The Complete Reference, Twelfth Edition, 12th Edition

Herbert Schildt

Publisher Resources

ISBN: 9781260440249