多选题
Given:
3. class Department {
4. Department getDeptName() {return new Department(); }
5. }
6. class Accounting extends Department {
7. Accounting getDeptName() {return new Accounting(); }
8. // insert code here
13. }
And the following four code fragments:
Ⅰ. String getDeptName(int x) {return "mktg"; }
Ⅱ. void getDeptName(Department d) { ; }
Ⅲ. void getDeptName(long x) throws NullPointerException {
throw new NullPointerException();
}
Ⅳ. Department getDeptName() throws NullPointerException {
throw new NullPointerException();
return new Department();
}
Which are true? (Choose all that apply.)