Java Constructor Overloading
Constructor overloading means defining more than one constructor function having same name but having different parameters list.
The overloading is also called as Polymorphism means ability to have more than one forms.It is used when objects are required to perform same task but by using different parameters
Working of Overloaded Constructor
- Java matches the method name then number of parameters to call particular constructor
- Java looks for a match between the arguments used to call the method and its parameters
- The methods return type is not important while overloading the constructors