int[][] m = {{1, 2}, {3, 4}};
m[0][1] = m[1][0] + m[1][1];
System.out.println(m[0][1]);What is printed?
- A
2
- B
6
- Ccheck_circle
7
- D
5
Explanation
m[1][0] is 3 and m[1][1] is 4. Their sum 7 is assigned to m[0][1].
AP Computer Science A· difficulty 3/5
int[][] m = {{1, 2}, {3, 4}};
m[0][1] = m[1][0] + m[1][1];
System.out.println(m[0][1]);What is printed?
2
6
7
5
Explanation
m[1][0] is 3 and m[1][1] is 4. Their sum 7 is assigned to m[0][1].
Want 10 more like this — adaptive to your weak spots?