What is Inheritance?
Usually we use to say that his father is criminal so he will also be a criminal. That means son is inheriting his father's mottos, not all but he will some. In Class, there could be many sub-classes and all sub-classes inherit the properties of main class. So, Inheritance is the terminology to inherit some (not all) properties of its main class.
Comments
Post a Comment