Calculate sum - Java Quiz Question


What will be the output of the following program?


A
sum = 5
B
sum = 25
C
sum = 30
D
Compilation Error
E
Throws ArrayIndexOutOfBoundsException