当前位置:SCJP程序员认证考试题库

问题:

[单选]

10. public class SuperCaic { 
11. protected static int multiply(int a, int b) { return a * b; } 
12. } 
and: 
20. public class SubCalc extends SuperCalc { 
21. public static int multiply(int a, int b) { 
22. int c = super.multiply(a, b); 
23. return c; 
24. } 
25. } 
and: 
30. SubCalc sc = new SubCalc(); 
31. System.out.println(sc.multiply(3,4)); 
32. System.out.println(SubCalc.multiply(2,2)); 
What is the result?()

A .  12 4
B .  The code runs with no output.
C .  An exception is thrown at runtime.
D .  Compilation fails because of an error in line 21.
E .  Compilation fails because of an error in line 22.
F .  Compilation fails because of an error in line 31.

塑炼的目的? 《教育白皮书》 下面说法错误的是() 如果想预览当前页面可以按快捷键F12。 层内不可以再嵌套层。 采用按下“描绘层”按钮,是无法在层中使用鼠标拖动的方法创建子层。 可以在参数设置里更改默认层的属性。 小学生思维发展的质变期或关键期一般认为是小学() 二年级。 三年级。 四年级。 五年级。 下列哪些矿物在紫外光照射下发荧光() 方铅矿。 白钨矿。 石榴子石。 橄榄石。

10. public class SuperCaic { 
11. protected static int multiply(int a, int b) { return a * b; } 
12. } 
and: 
20. public class SubCalc extends SuperCalc { 
21. public static int multiply(int a, int b) { 
22. int c = super.multiply(a, b); 
23. return c; 
24. } 
25. } 
and: 
30. SubCalc sc = new SubCalc(); 
31. System.out.println(sc.multiply(3,4)); 
32. System.out.println(SubCalc.multiply(2,2)); 
What is the result?()

参考答案:

  参考解析

本题暂无解析

在线 客服