How polymorphism is different from inheritance?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of Cape Town, Lives in Cape Town, South Africa.
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. This is a situation that results when you have one class inheriting from another and overriding a particular method.Jun 10, 2011
2023-06-11 06:34:36
评论(499)
Helpful(122)
Helpful
Helpful(2)

Emily Harris
QuesHub.com delivers expert answers and knowledge to you.
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. This is a situation that results when you have one class inheriting from another and overriding a particular method.Jun 10, 2011