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.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

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.