Город МОСКОВСКИЙ
01:24:56

52 - IS-A and HAS-A Relationship in Java | Inheritance in Java (Hindi/Urdu)

Аватар
Java Advantage: преимущества ваших проектов
Просмотры:
23
Дата загрузки:
05.12.2023 00:55
Длительность:
01:24:56
Категория:
Обучение

Описание

LIKE, SHARE & SUBSCRIBE

IS-A and HAS-A relationships are used to provide a relationship in two more Java classes.

IS-A relationship is also known as Inheritance in Java which uses extends keyword so that we can inherit all the data members and functionalities from our Parent Class to our Child Class.

IS-A relationship is generally used for code reusability and for Run-Time polymorphism or Method Overriding.

HAS-A relationship is used to access specific data members and specific methods or functionalities from the Parent Class to the Child Class

HAS-A relationship is also known as Association and it has its own types.

1) Aggregation
2) Composition

Aggregation is a type of HAS-A relationship in which the entities or the objects of all the classes are weakly bonded and they can work independently.

Composition is a type of HAS-A relationship which is also known as PART-OF relationship in which the entities or the objects of all the classes are strongly bonded and they cannot work independently.

Codes used in this video: https://drive.google.com/open?id=1LS6z-3nF_sgbYzVlQUX3fUnW31ksaCTS

Inheritance Videos :
Part 1 : https://youtu.be/YK7H0tRW1lw
Part 2 : https://youtu.be/4qaFkbbCtXI

Thanks for watching and stay tuned.

Like us on Facebook - https://goo.gl/y7oxYc
Follow us on Twitter - https://goo.gl/UKmTfn

Рекомендуемые видео