0

Override and polymorphism

my friends what is tthe different between override and polymorphism?

17th Apr 2017, 7:11 AM
‏‪‏‪عبدالله بوستة‬‏
‏‪‏‪عبدالله بوستة‬‏ - avatar
3 Antworten
+ 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
0
thinks for your answer.
17th Apr 2017, 7:50 AM
‏‪‏‪عبدالله بوستة‬‏
‏‪‏‪عبدالله بوستة‬‏ - avatar