Domanda di colloquio di Entrata India

What is difference between method overloading and overriding

Risposta di colloquio

Anonimo

13 mag 2021

In method overloading the same function can be used for multiple purposes depends on the parameters supplied. Whereas method overriding is nothing but parent class define a method which gets override by the child class. Method overloading happens at compile time (early binding) whereas overriding happens during runtime (late binding)