Array Accessing - Java Quiz Question


What will be the output of the following program?


A
Sum = 40
B
Sum = 30
C
Sum = 10
D
Compilation error
E
Throws ArrayIndexOutOfBoundsException