Whatwillbetheresultofattemptingtorunthefollowingprogram?()publicclassQaa75{publicstaticvoidmain(Stringargs[]){String[][][]arr={{{},null},{{"1","2"},{"1",null,"3"}},{},{{"1",null}}};System.out.println(arr.length+arr[1][2].length);}}A.Theprogramwillterminat

题目

Whatwillbetheresultofattemptingtorunthefollowingprogram?()publicclassQaa75{publicstaticvoidmain(Stringargs[]){String[][][]arr={{{},null},{{"1","2"},{"1",null,"3"}},{},{{"1",null}}};System.out.println(arr.length+arr[1][2].length);}}

A.TheprogramwillterminatewithanArrayIndexOutOfBoundsException.

B.TheprogramwillterminatewithaNullPointerException.

C.4willbewrittentostandardoutput.

D.6willbewrittentostandardoutput.

E.7willbewrittentostandardoutput.


相似考题