Java Constructor Overloading

Like a method’s, we can create a more than one constructor with same name as the class name.

But each constructor has a different parameter. Such constructor is dfcalled overloaded constructor and this procedure is known as constructor overloading.

Syntax

Example

Explanation: In the above program inside class “Employee”, we have created five constructors and each constructor have the different parameter list.

Such constructors are called the overloaded constructor and the process of creating multiple constructors with the same name with different parameter list called constructor overloading.