tangorishi / learnJava

LearnJava - Hacktoberfest 2023 🚀 Join us in celebrating Hacktoberfest 2023 by contributing to this Java programming repository! Whether you're a beginner or an expert, dive into Java, share your knowledge, and make Hacktoberfest unforgettable. 📚💻 Happy coding and contributing! 🚀🌟
MIT License
26 stars 45 forks source link

Update inheritance.md #126

Open competitiveblood opened 10 months ago

competitiveblood commented 10 months ago

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.