what is the difference between inheritance and polymorphism in oop
Answers
Answered by
2
Answer:
The main difference is polymorphism is a specific result of inheritance. Polymorphism is where the method to be invoked is determined at runtime based on the type of the object. ... Additionally, polymorphism deals with method invocation whereas inheritance also describes data members, etc.
mark as BRAINLIST sister
Answered by
1
Inheritance is creating a class that derives its feature from an already existing class. On the other hand,polymorphism is an interface that can be defined in multiple forms. Inheritance is implemented on the classes whereas, the polymorphism is implemented on methods/functions
Similar questions
Social Sciences,
5 months ago
Social Sciences,
5 months ago
English,
5 months ago
English,
10 months ago
Hindi,
1 year ago