Question: I get an out of bounds error for the line: `int currentInt = matrix[i][j];`

```
public class Matrix
{
    private int[][] matrix;

    /**
     * Constructor for objects of class Matrix
     * @param array a 2-d array
     */
    public Matrix(int[][] array)
    {
       matrix = array;
    }

    public int min()
    {
       int min = matrix[0][0];
        for(int i = 0; i < matrix.length; i++)
        {
            for(int j = 0; i < matrix[0].length; i++)
            {
                int currentInt = matrix[i][j];
                if(min > currentInt)
                {
                   min = currentInt;
                }

            }
        }
        return min;
    }

}

```

Answer: 
```
for(int j = 0; i < matrix[0].length; i++)

```

should be

```
for(int j = 0; j < matrix[i].length; j++)

```

or if the array is square :

```
for(int j = 0; j < matrix[0].length; j++)

```
You forgot to change the `j` in the 2nd for loop

`for(int j = 0; i < matrix[0].length; i++)`

should be

`for(int j = 0; j < matrix[0].length; j++)`