Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the method of Overloading in Java?

user-image
Question ajoutée par salma samreen , Quality Assurance Engineer , Private Limited
Date de publication: 2016/02/06

Since reusability is the best process for anything, so JAVA also give us an option to reuse our resources in a given program.

Overloading in JAVA simply means to reuse the same method or fuction name in a class but with different arguements.

Internal process is pretty simple. Whenever we call a method / function in JAVA the compiler only checks the name and arguement.

Utilisateur supprimé
par Utilisateur supprimé

Overloading in JAVA is the ability given to a class to have several methods with the same name but with different number of parameters or different parameters data types. 

Overloading works as well with the constructor, called constructor overloading which allows a class to have several constructors with different argument lists. 

Both type of overloading are part of static polymorphism. 

 

Overriding and Overloading must not be confused. 

More Questions Like This