Inheritance is an important pillar of OOP(Object-Oriented Programming).
It is the mechanism in java by which one class is allowed to inherit the
features (properties and methods) of another class.
Timestamps:
00:00 Introduction
00:30 Important Terminologies
02:03 Super Class/Parent Class
02:18 Sub Class / Child Class
03:27 Understanding Inheritance
Super Class
The class whose features are inherited is known as superclass
(or a base class or a parent class).
Sub Class
The class that inherits the other class is known as a subclass (or
a derived class, extended class, or child class). The subclass can add its own
properties and methods in addition to the superclass properties and methods.
Reusability
Inheritance supports the concept of “reusability”, i.e. when we
want to create a new class and there is already a class that includes some of
the code that we want, we can derive our new class from the existing class.
By doing this, we are reusing the fields and methods of the existing class.
Support us:
Like Share Subscribe
In questa pagina del sito puoi guardare il video online Java - What is Inheritance? della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Brown Coder 19 maggio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 76 volte e gli è piaciuto 17 spettatori. Buona visione!