Describe the terms: method overriding and method overloading
Describe the terms: method overriding and method overloading
devquora
Posted On:
Feb 22, 2018
Method Overriding:
In Method Overriding, the subclass has a similar strategy with the same name and the very same number and kind of parameters and same return type as a superclass.
Method Overriding is to "Change" existing conduct of strategy.
It is a run time polymorphism.
The techniques must have the same mark.
It generally requires legacy in Method Overriding.
Method Overloading:
In Method Overloading, Methods of a similar class has a similar name yet every strategy must have a diverse number of parameters or parameters having distinctive sorts and request.
Method Overloading is to "include" or "broaden" more to strategy's conduct.
It is an accumulate time polymorphism.
The techniques must have a distinctive mark.
It might possibly require legacy in Method Overloading.