试题详情
- 单项选择题 class A { public int getNumber(int a) { return a + 1; } } class B extends A { public int getNumber (int a) { return a + 2 } public static void main (String args) { A a = new B(); System.out.printIn(a.getNumber(0)); } } What is the result? ()
A、 Compilation succeeds and 1 is printed.
B、 Compilation succeeds and 2 is printed.
C、 An error at line 8 causes compilation to fail.
D、 An error at line 13 causes compilation to fail.
E、 An error at line 14 causes compilation to fail.
- B
关注下方微信公众号,在线模考后查看
热门试题
- Which statemen
- 举例说明getter和setter方法的
- 对于从Employee表中选择记录的以下
- 1. public&ensp
- 宴会上一共有1225次握手,设每一位参加
- Runnable r&ens
- 下面的说法正确的是()
- Given classes&e
- 以下多线程程序的设计步骤,其中错误的是(
- 求sum=d+dd+ddd+……+ddd
- Which two,&ensp
- int x=0; int y=10;
- Given: Intege
- A developer&en
- public class&e
- Which two̳
- 共有几组i、j、k符合算式ijk+kji
- 以下关于支持Java运行平台的叙述,哪项
- 对于利用消息框类(JOptionPane
- What is th