VIETNAM TECHNICAL VIEW
The array.length property only gives you the number of rows. To find the total number of elements, you must iterate through every row and add up their individual lengths.
int totalElements = 0; for (int i = 0; i < array.length; i++) for (int j = 0; j < array[i].length; j++) totalElements++; Use code with caution.
Finally, call the method for each row using the correct coordinates: