2D Array Nested Loop Traversal
What is the third value printed when the following code segment is executed?
int[][] table = {
{4, 4, 4},
{2, 2, 2},
{6, 6, 6},
{1, 1, 1}
};
for (int col = 0; col < table[0].length; col++) {
for (int row = table.length - 1; row > col; row--) {
System.out.println(table[row][col]);
}
}
A
6
B
2
C
nothing will be printed
D
4
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE