Java - What Is Single Inheritance?

Veröffentlicht am: 30 Mai 2021
auf dem Kanal: Brown Coder
60
18

Single inheritance is simple and easy to understand. When a class extends another one class only then we call it a single inheritance.

Timestamps
00:00 Introduction
00:33 Creating New File
01:05 Creating Base Class
02:19 Creating Object of Base Class
02:35 Understanding ' this.getClass().getName() '
02:58 Creating Derived Class
03:35 Using extends keyword
03:57 Creating Object of Derived Class
04:13 More Explanation

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


Auf dieser Seite können Sie das Online-Video Java - What Is Single Inheritance? mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Brown Coder 30 Mai 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 60 Mal angesehen und es wurde von 18 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!