このコードがコンソールに結果を表示しない理由を教えてください。
class employee {
protected String name;
protected double salary;
protected String dob;
public employee(String name, double salary, String dob) {
this.name = name;
this.salary = salary;
this.dob = dob;
}
public employee(String name, double salary) {
this.name = name;
this.salary = salary;
}
}
public class Manage extends employee {
String dept1;
public Manage(String name, double salary, String dob, String dept1) {
super(name, salary, dob);
this.dept1 = dept1;
}
public Manage(String name, double salary, String dept1) {
super(name, salary);
this.dept1 = dept1;
}
public static void main(String args[]) {
employee e = new employee("Vikas", 122345);
employee e2 = new employee("Vikas", 122345, "12-2-1991");
Manage m = (Manage) new Manage("Vikas", 122345, "Sales");
Manage m2 = new Manage("Vikas", 122345, "12-2-1991", "sales");
m.display();
m2.display();
}
public void display() {
System.out.println("Name " + name);
System.out.println("Salary " + salary);
System.out.println("Birth " + dob);
System.out.println("Department " + dept1);
}
}