Answered You can hire a professional tutor to get the answer.
Give the final contents of the array, a, after the code below is executed. What is the difference between "a.length" and "a[i].length"?
Give the final contents of the array, a, after the code below is executed. What is the difference between “a.length” and “a[i].length”?
int[][] a = new int[3][3];
for (int i=0; i < a.length; i++) {
for (int j=0; j < a[i].length; j++) {
if (i != j) {
a[i][j] = 0;
}
else {
a[i][j] = 1;
}
}
}