In this Java tutorial, you will learn what inheritance is when it comes to Object Oriented Programming, and how Inheritance is implemented in Java with classes, with examples.
Inheritance
Inheritance is an Object Oriented Concept in Java. It allows an object of a class to own the variables and methods of another class. In Java, Inheritance is realized using the keyword extends.
In a parent-child analogy, child inherits parents variables(money, house, etc.,) and methods(behaviors from genetics). The same way, an object of a child class, which extends a Parent class, can access the variables and methods of Parent class as of its own.
