Skip to Content
Interactive Object-Oriented Programming in Java: Learn and Test Your Programming Skills
book

Interactive Object-Oriented Programming in Java: Learn and Test Your Programming Skills

by Vaskaran Sarcar
December 2019
Beginner to intermediate
604 pages
10h 9m
English
Apress
Content preview from Interactive Object-Oriented Programming in Java: Learn and Test Your Programming Skills
© Vaskaran Sarcar 2020
V. SarcarInteractive Object-Oriented Programming in Javahttps://doi.org/10.1007/978-1-4842-5404-2_4

4. The Concept of Inheritance

Vaskaran Sarcar1 
(1)
Bangalore, Karnataka, India
 

The main objective of inheritance is to promote reusability and eliminate redundancy in code. It also demonstrates how a child class can obtain the features (or characteristics) of its parent class. Since a parent class is placed at a higher level in the class hierarchy, and a child class can derive from it. A child class is often referred to as a derived class or subclass. A parent class is also referred to as a super class.

Types of Inheritance

In general, you will deal with four types of inheritance. In Java, a class can inherit from another 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

Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17

Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17

Kishori Sharan, Adam L. Davis
Java Coding Problems

Java Coding Problems

Anghel Leonard

Publisher Resources

ISBN: 9781484254042Purchase LinkPublisher Website