23. 给出下面的不完整的类代码
class Person {
String name, department;
int age;
public Person(String n){ name = n; }
public Person(String n, int a){ name = n; age = a; }
public Person(String n, String d, int a) {
// 完成Person(String n, int a)的逻辑
department = d;
}
}
A. Person(n,a);
B. this(Person(n,a));
C. this(n,a);
D. this(name,age);
|
|