1.

What is the output of this program?public class exception_Example { public static void main(String args[]) { try { int array[] = {1, 2,3 , 4, 5}; for (int k = 0; k < 7; ++k) System.out.print(array[k]); } catch(ArrayIndexOutOfBoundsException e) { System.out.print("5"); } } }

A. 123455
B. 123
C. 12345
D. 123450
E. 120345
Answer» B. 123


Discussion

No Comment Found

Related MCQs