Overloading means overcharge. In the programming world, this means that the same method name can be used in others more, only that one of them can have several returns or/and parameters of different inputs. If we analyze from the codification point of view, we get a greater lucre when we talk about source code quality and organization of it.

Most of the actual programming languages deals with methods overcharge and this makes a lot easier on daily bases the developer work that don’t need to create different methods with different names that will deal with the same situation or accomplish a differential procedure according to the early parameters.

Check out the examples about methods overcharge:

public static int square(int num){
int numRet;
numRet = num * num;
return numRet;
}

public static double square(double num){
double numRet;
numRet = num * num;
return numRet;
}

Realize that both methods have the same name but they return a different type of variable and, with it, they are capable to resolve a possible situation where the developer needs to work with round numbers or decimal numbers making exactly the same procedure.

e

SCRIPTCASE: What is VS What is not

What is VS What is not What is ScriptCase? It is a fast development environment with tools that f...

e

e

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.