欢迎来到牛牛题库网 牛牛题库官网
logo
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

11. class Person { 
12. String name = “No name‟; 
13. public Person(String nm) { name = nm; } 
14. } 
15. 
16. class Employee extends Person { 
17. String emplD = “0000”; 
18. public Employee(String id) { empID = id; } 
19. } 
20. 
21. public class EmployeeTest { 
22. public static void main(String[] args) { 
23. Employee e = new Employee(”4321”); 
24. System.out.println(e.empID); 
25. } 
26. } 
What is the result?() 

A. 4321
B. 0000
C. An exception is thrown at runtime.
D. Compilation fails because of an error in line 18.

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题