+ 2

“Inheritance helps to make reusable code”

What does this mean

8th Apr 2020, 5:39 AM
Nishu Malik
Nishu Malik - avatar
1 Odpowiedź
+ 2
Your parent class data members which are public and protected will be inherited by your child class. So all the methods will also be inherited, you do not have to write them again in your child class explicitly.
8th Apr 2020, 6:14 AM
Avinesh
Avinesh - avatar