单项选择题
给出下列的程序,其叙述正确的是( )。public class Man{static int arr[]=new int[10];public static void main(String args[]){System. out. println (arr[1=];}}
A.编译时将发生错误
B.编译时正确但是运行时出错
C.输出为0
D.输出为null
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是( )。interface A{ int method1 (int i); int method2 (int j);}
A.class B implements A{ int method1() { } int method2() { }}
B.class B{int method1(int { }int method2(int { }}
C.class B implements A{ int methodl(int { } int method2(int { }}
D.class B extends A{int method1(int { }int method2(int { }}
点击查看答案
单项选择题
下列叙述中,错误的是( )。
A.接口与类的层次无关
B.通过接口说明类所实现的方法
C.通过接口可了解对象的交互界面
D.接口与存储空间有关
点击查看答案
相关试题
下面程序段的输出结果是( )。class Bas...
下列程序输出结果为( )。public class...
在oneMethod()方法运行正常的情况下,程...
下列属于正则表达式的是( )。