Override and polymorphism | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita

Override and polymorphism

my friends what is tthe different between override and polymorphism?

17th Apr 2017, 7:11 AM
‚ÄŹ‚Ä™‚ÄŹ‚Ä™ōĻō®ōĮōßŔĄŔĄŔá ō®Ŕąō≥ō™ō©‚Ĩ‚ÄŹ
‚ÄŹ‚Ä™‚ÄŹ‚Ä™ōĻō®ōĮōßŔĄŔĄŔá ō®Ŕąō≥ō™ō©‚Ĩ‚ÄŹ - avatar
3 Respuestas
+ 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
17th Apr 2017, 7:24 AM
Meharban Singh
Meharban Singh - avatar
+ 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.
17th Apr 2017, 7:26 AM
Tam√°s Barta
Tam√°s Barta - avatar
thinks for your answer.
17th Apr 2017, 7:50 AM
‚ÄŹ‚Ä™‚ÄŹ‚Ä™ōĻō®ōĮōßŔĄŔĄŔá ō®Ŕąō≥ō™ō©‚Ĩ‚ÄŹ
‚ÄŹ‚Ä™‚ÄŹ‚Ä™ōĻō®ōĮōßŔĄŔĄŔá ō®Ŕąō≥ō™ō©‚Ĩ‚ÄŹ - avatar