试题详情
- 单项选择题 interface Beta {} class Alpha implements Beta { String testIt() { return “Tested”; } } public class Main1 { static Beta getIt() { return new Alpha(); } public static void main( String[] args ) { Beta b = getIt(); System.out.println( b.testIt() ); } } What is the result?()
A、 Tested
B、 Compilation fails.
C、 The code runs with no output.
D、 An exception is thrown at runtime.
- B
关注下方微信公众号,在线模考后查看
热门试题
- Given the&ensp
- 完成数组int[] a = {100,4
- When usingQ
- class super&en
- What is th
- What is th
- 如果XextendsY,那么()
- 说明实例成员和静态成员之间的差别。
- 任意输入一个正整数,判断其是否是多因子完
- 如果a,b是引用类型的变量,且赋值表达式
- 下面的代码是否有错误?() If&en
- 对于如下代码,描述正确的是哪项?&en
- public class&e
- Given the
- 在Swing GUI编程中,
- 文本框中显示的字符长度&可以显示的文本长
- public c
- A Company.com&
- 假设有一个面板PanelOne,它的布局
- 设计一个汽车类Multiplicatio