Consider the following method:
public List mystery(int[][] data, int n) {
List result = new LinkedList();
for (int i = 0; i < data.length; i++) {
if (data[i][n] % n != 0) {
result.add(data[i][n]);
}
}
return result;
}
Suppose that a variable called grid has been declared as follows:
int[][] grid = {{25, 72, 13, 12, 24, 18}, {16, 14, 4, 23, 15, 3},
{13, 29, 42, 52, 89, 18}, {25, 31, 35, 22, 66, 61}};
which means it will store the following 4-by-6 grid of values:
25 72 13 12 24 18
16 14 4 23 15 3
13 29 42 52 89 18
25 31 35 22 66 61
For each call below, indicate what value is returned. If the method call results in an exception being thrown, write "exception" instead.