0
Override and polymorphism
my friends what is tthe different between override and polymorphism?
3 Réponses
+ 8
Polymorphism is a concept,which can be achieved using overriding.
Every overriding is a type of polymorphism,but every type of polymorphism is NOT overriding.
Hence polymorphism is a broader concept(contains overloading as well) than overriding.
Same as an insect and cockroach.
insect is broad category
+ 3
When your class extends an other you can OVERRIDE parent methods and create your implementation. POLYMORPHISM makes it possible that the right implementation will be used during runtime.
0
thinks for your answer.