Consider the following code segment.
int[][] mat = {{10, 15, 20, 25},
{30, 35, 40, 45},
{50, 55, 60, 65}};
for (int[] row : mat)
{
for (int j = 0; j < row.length; j += 2)
{
System.out.print(row[j] + " ");
}
System.out.println();
}
What, if anything, is printed as a result of executing the code segment?
A 10 15 20 25
50 55 60 65
B 10 20
30 40
50 60
C 10 15 20 35
30 35 40 45
50 55 60 65
D Nothing is printed, because an ArrayIndexOutOfBoundsException is thrown.
E Nothing is printed, because it is not possible to use an enhanced for loop on a two-
dimensional array.