how is reusability supported by inheritance ? explain with example
Answers
Answered by
2
Answer:
Inheritance is a mechanism in which one class acquires the property of another class. For example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields and methods of the existing class
Answered by
0
Answer:
for example: human being
Explanation:
let's take a class mammal from class human which inherited the property which again inherits some property from another class animal. Thus, reusability is supported by inheritance.
Similar questions