Inheritance In Java | Use of Inheritance | Types of inheritance | W3schools

preview_player
Показать описание
Inheritance refers to a way of implementing an IS-A relationship i.e. parent-child relationship. A subclass inherits the superclass properties like data members and methods. Inheritance is a way of code re-usability. Let us consider an example of parent and child. A child inherits the properties of its parent.

Use of Inheritance

Types of inheritance
1. Single inheritance:
2. Multilevel inheritance:
3. Hierarchical inheritance:

#java #javaprogramming #javaexamples #inheritance #w3schools
Рекомендации по теме
visit shbcf.ru