多选题
What is the value of the variable sum at the end of this code segment?
int[][] square=new int[3][3];
for(int i=0;i<3;i++) {
square[i][i]=5;
}
int sum=0;
for(int i=0;i<3;i++) {
for(int j=0;j<3;j++) {
sum+=square [i][j];
}
}
A. 0
B. 5
C. 10
D. 15
E. 20
F. 25
G. 30
H. 35
I. 40
J. 45
K. 50
L. It will generate a compiler error.