Coordinate Grid Generator
A nested loop structure generates a sequence of concatenated coordinate values based on row and column indices.
What is printed when the following Java program is compiled and run?
public class QuestionTrace {
public static void main(String[] args) {
for (int i = 1; i <= 2; i++) {
for (int j = 1; j <= 3; j++) {
System.out.print(i + j);
}
}
}
}
A
123234
B
234456
C
345456
D
234345
Question Leaderboard
Not enough data yet to show leaderboard.
