public class Employee {
public String name;
public int age;
public int salary;
// No Argument Constructor
Employee(){
this.name = "";
this.age = 0;
this.salary = 0;
}
// Single Argument Constructor
Employee(String name){
this.name = name;
this.age = 0;
this.salary = 0;
}
// Argument Constructor
Employee(String name,int age){
this.name = name;
this.age = age;
this.salary = 0;
}
// Argument Constructor
Employee(String name,int age,int salary){
this.name = name;
this.age = age;
this.salary = salary;
}
}
|