1.

What is the output of this program?
public class ExceptionHandling_Example
{
public static void main(String args[])
{
try
{
int array[] = {5,6,7,8};
for (int K = 0; K < 7; ++K)
System.out.print(array[K]);
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.print("9");
}
}
}

A. Compilation Error
B. 56789
C. Runtime Error
D. 12345
E. 56780
Answer» C. Runtime Error


Discussion

No Comment Found

Related MCQs