Java - Constructors
Examine the following Java class and identify the error:
class Employee {
String name;
int id;
Employee(String name, int id) {
this.name = name;
this.id = id;
}
Employee() {
name = "Unknown";
}
}
public class Test {
public static void main(String[] args) {
Employee e = new Employee();
System.out.println(e.id);
}
}