Discussion Forum

Constructor Overloading

Constructor Overloading

by Deepa Prajapati -
Number of replies: 1

What is Constructor Overloading?

In reply to Deepa Prajapati

Re: Constructor Overloading

by Ashutosh Bhatt -
The constructor overloading can be defined as the concept of having more than one constructor with different parameters so that every constructor can perform a different task.
Giving you a basic example of constructor overloading.
public class Rama{
int id;
String name;
Rama(){
}
Rama(int i, String n){
}}