Refresher and resource for OOP concepts, collections, generics, conventions and more.
Inheritance is the mechanism in java by which one class is allowed to inherit the features (fields and methods) of another class. Terminology:
- Super Class: The class whose features are inherited is known as super class (or a base class or a parent class).
- Sub Class: The class that inherits the other class is known as sub class (or a derived class, extended class, or child class). The subclass can add its own fields and methods in addition to the superclass fields and methods.