The Syntax and Terminologies
Explore Java inheritance by understanding key terminologies such as superclass and subclass. Learn how to use the extends keyword to create new classes based on existing ones, enabling code reuse and modular programming.
We'll cover the following...
We'll cover the following...
The terminologies
A new class is created based on an existing class in Inheritance, hence we use the terminology below for the new class and the existing class:
- SuperClass (Parent Class or Base Class): This class allows the re-use of its
non-privatemembers in another class. - SubClass (Child Class or