What is difference between function overloading and overriding?
What is difference between function overloading and overriding?
On 2014-06-09 05:04:23.0
brajeshkumar
function overloading means function name same and different argument and with in same class ,overiding means same function name and same argument and return type also same and with in diff. class.
On 2014-06-09 06:51:24.0
sujata
Overloading meaning same method name ,different arguments in same class..Overriding mean same method name ,same argument but in different class.
On 2014-06-09 07:39:50.0
subha064
Function Overloading :
Same function name but different signature.
You can achieve static polymorphism by doing function overloading.
You can not achieve function overloading on the basis of return type.
Function Overriding :
Same method name same signature but calling by different objects.
You can achieve Run time polymorphism by doing function overriding.
At the run time it is going to be decided that which method is going to be called.