learnJava icon indicating copy to clipboard operation
learnJava copied to clipboard

Update inheritance.md

Open shivangiS04 opened this issue 2 years ago • 0 comments

fixed #122

INHERITANCE IN JAVA

Inheritance in Java is a fundamental concept that allows a new class (subclass or child class) to inherit properties and behaviors from an existing class (superclass or parent class). This promotes code reuse and establishes an "is-a" relationship between classes. Subclasses can access the attributes and methods of their superclass, and they can also extend and override those inherited members. Inheritance helps create a hierarchy of classes, making code more organized and efficient. It's a key pillar of object-oriented programming, enabling the building of more specialized classes on top of more general ones, facilitating modularity and maintaining code consistency.

shivangiS04 avatar Oct 31 '23 14:10 shivangiS04