Route1 interview question

What is method overloading and method overriding?

Interview Answer

Anonymous

10 June 2018

Method Overloading : In Method Overloading, Methods of the same class shares the same name but each method must have different number of parameters or parameters having different types and order. Method Overloading is to “add” or “extend” more to method’s behavior. It is a compile time polymorphism. The methods must have different signature. It may or may not need inheritance in Method Overloading.