Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the method of Overloading in Java?

user-image
Question added by salma samreen , Quality Assurance Engineer , Private Limited
Date Posted: 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.

Deleted user
by Deleted user

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