In below example, what is super() in the Person class calling? I understood that super() is used to invoke a constructor of a parent class, but Person is the parent class in this example?
public class Employee extends Person {
public static void main(String[] args) {
Person person = new Employee(); // triggers Employee()
}
Employee(String s) {
super(null); // invokes Person's constructor, could be left out if Person had an empty constructor
System.out.println(s);
}
Employee() {
this("Employee X"); // invokes Employee(String s)
}
}
public class Person {
Person(String s) {
super(); // ?
}
}