Pergunta de entrevista da empresa Vanguard

What is polymorphism and why is it important?

Resposta da entrevista

Sigiloso

13 de fev. de 2017

he method's ability to do different things depending on the object that it is acting upon. In other words, polymorphism allows you define one interface and have multiple implementations. Examples are Method Overloading and Method Overriding. Method Overloading (When two or more methods have the same name in a class, while also having different arguments or parameters) Method Overriding (That's when a child class has the same method as of base class. When that happens the child class can override the parent class method, even without touching the source code of the base class. ).