Glad you figured it out. As I said earlier, the code below demonstrates a more appropriate way to write for() loops to iterate arrays.
// a method to demonstrate the declaration and initialization
// of a 2D array with 4 rows and 4 columns. the first element of
// each row of the array is initialized to the row number, and
// each element in the row thereafter increases by one
public static void arrayMethod()
{
// declare a 2D array with 4 rows and 4 columns
int[][] arr = new int[4][4];
// initialize the array
// for each row, i: arr.length = number of rows
for (int i = 0 ; i < arr.length ; i++)
{
// for each column, j: arr[i].length = the number of
// elements or columns in the row i
for (int j = 0 ; j < arr[i].length ; j++)
{
arr[i][j] = j + i;
}
}
// display the completed array
System.out.println( Arrays.deepToString( arr ) );
} // end method arrayMethod()