首页 试题详情
单选题

下列代码的编译或执行结果是: public class MyVal { public static void main(String[] args) { MyVal m = new MyVal(); m.aMethod(); } public void aMethod(){ boolean [] b = new Boolean [5]; System.out.println(b[0]); } }

A1

Bnull

C0

D编译错误

正确答案:A (备注:此答案有误)

相似试题

  • 单选题

    下列代码执行结果是?[i**iforiinxrange(3)]

    答案解析

  • 单选题

    下列代码编译执行结果是:public class MyVal { public static void main(String[] args) { MyVal m = new MyVal(); m.aMethod(); } public void aMethod(){ boolean [] b = new Boolean [5]; System.out.println(b[0]); }}

    答案解析

  • 单选题

    阅读下列代码段class Test implements Runnable { public int run( ) { int i = 0; while (true) { i++; System.out.println (i=+i); } }}上述代码编译结果是

    答案解析

  • 单选题

    下列代码执行结果是:int length = Hello.length();System.out.println(length);

    答案解析

  • 单选题

    执行下列代码,程序输出结果是(用下划线表示空格):( )int a=29,b=100;cout

    答案解析

热门题库