Pergunta de entrevista da empresa Ford Otosan

What do "Overload" and "Override" mean in the OOP world?

Resposta da entrevista

Sigiloso

28 de mai. de 2022

They are basically keywords of the concept of Polymorphism. When two or more methods in the same class have the same name but different parameters, it's called Overloading. When the method signature (name and parameters) are the same in the superclass and the child class, it's called Overriding. Overriding implements Runtime Polymorphism whereas Overloading implements Compile time polymorphism.