In Dictionary if you search the word ‘inheritance’, you’d land up finding this kind of description: …objects that someone gives you when they die.
In the programming world, it does not mean exactly the same in every sense but almost same if you take the literal meaning. Yes, there is a parent class with one or more child classes. The Child-Classes inherit the objects from their parents. These child classes are free to modify or override the properties and methods that they inherit. In real world it does not happen always.
Let us a have a simple code to check a parent class and child class.