Given a problem that says Use a for statement to initialize each element for the sum of its indices . Assume that a and b are declared as control variables
and Here's my code
public static void main(String[] args) {
// TODO code application logic here
int[][] indicesSum=new int[10][10];
for (int x=0;x<indicesSum.length; x++){
for (int y=0;y<indicesSum.length; y++) {
indicesSum[x][y]=x+y;
System.out.println(indicesSum[x][y]);
}
}
}
is that right?

