RE: What is the use/advantage of function overloading
Function overloading exhibits the behavior of polymorphism which helps to get different behaviour, although there will be some link using same name of function. Another powerful use is constructor overloading , which helps to create objects differently and it also helps a lot in inheritance.
RE: What is the use/advantage of function overloading
For eg: Say a method called addUs(a,b) adds a and b. So the definition will be
int addUs(int a, int b){
 return a+b;
}
But now if you want your arguments to be Objects of a class say class Demo{ int height; int width; } You want the same function addUs() to return a new object which would have attributes height and width having values as sum of the height & width of the 2 arguments passed.
So now the definition would be:
Demo addUs(Demo a, Demo b){ Â this.height = a.height + b.height; Â this.widht = a.widht + b.width; Â return this; }
RE: What is the use/advantage of function overloading
Function overloading is one or more funcation has different number of argument or diffrent type of argument but all have same return type otherwise it create ambitious to knowing which function u may want to call. It is also save the memory space and provide compile time polymorphysm.