filmov
tv
Java Practice It | Self-Check 7.35: arrayMystery2d | arrays, 2D arrays, array basics

Показать описание
More practice its:
Problem:
Question:
Consider the following method:
public static void mystery2d(int[][] a) {
for (int c = 0; c { a[0].length - 1; c++) {
if (a[r][c + 1] } a[r][c]) {
a[r][c] = a[r][c + 1];
}
}
}
}
If a two-dimensional array named numbers is initialized to store the following integers, what are its contents after the call shown?
Problem:
Question:
Consider the following method:
public static void mystery2d(int[][] a) {
for (int c = 0; c { a[0].length - 1; c++) {
if (a[r][c + 1] } a[r][c]) {
a[r][c] = a[r][c + 1];
}
}
}
}
If a two-dimensional array named numbers is initialized to store the following integers, what are its contents after the call shown?