Discussion Forum

Constructor Overloading

Re: Constructor Overloading

by Ashutosh Bhatt -
Number of replies: 0
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){
}}