filmov
tv
Java Tutorial Part33 | OOPS Part2 | Inheritance | Single Inheritance

Показать описание
Java Tutorial Part33 | OOPS Part2 | Inheritance | Single Inheritance
If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos
Notes
Inheritance in Java is a mechanism in which one class acquires all the properties and behaviors of a parent class. It is an important part of OOPs (Object Oriented programming system).
Inheritance represents the IS-A relationship which is also known as a parent-child relationship
Sub Class/Child Class: Subclass is a class which inherits the other class. It is also called a derived class, extended class, or child class.
Super Class/Parent Class: Superclass is the class from where a subclass inherits
syntax of Java Inheritance
class Subclass-name extends Superclass-name
{
//methods and fields
}
The extends keyword indicates that you are making a new class that derives from an existing class. The meaning of "extends" is to increase the functionality.
On the basis of class, there can be three types of inheritance in java: single, multilevel and hierarchical.
In java programming, multiple and hybrid inheritance is supported through interface only. We will learn about interfaces later
#ARIVU_INFO
If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos
Notes
Inheritance in Java is a mechanism in which one class acquires all the properties and behaviors of a parent class. It is an important part of OOPs (Object Oriented programming system).
Inheritance represents the IS-A relationship which is also known as a parent-child relationship
Sub Class/Child Class: Subclass is a class which inherits the other class. It is also called a derived class, extended class, or child class.
Super Class/Parent Class: Superclass is the class from where a subclass inherits
syntax of Java Inheritance
class Subclass-name extends Superclass-name
{
//methods and fields
}
The extends keyword indicates that you are making a new class that derives from an existing class. The meaning of "extends" is to increase the functionality.
On the basis of class, there can be three types of inheritance in java: single, multilevel and hierarchical.
In java programming, multiple and hybrid inheritance is supported through interface only. We will learn about interfaces later
#ARIVU_INFO