试题详情
- 单项选择题 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.
- D
关注下方微信公众号,在线模考后查看
热门试题
- Click the
- 1.class TestSu
- Your web
- A Company.com&
- A developer is crea
- Which three
- 现有: &en
- 下列哪项不是Java语言的关键字?()&
- 常用的集成开发工具有哪些?各有什么特点?
- Which code,&ens
- Swing GUI通常由哪几
- public class&e
- Which is
- 35.String #name="Jan
- 采用折半查找的算法,在数组中查询到某个数
- What statement&
- 设某四位数的千位数字与十位数字的和等于百
- 以下变量类型中,不属于简单变量类型的是(
- 编程求一个整数数组的最大值、最小值、平均
- Given this&ens