int[][] m = new int[2][3];
System.out.println(m.length + " " + m[0].length);What is printed?
- Acheck_circle
2 3
- B
3 2
- C
2 2
- D
6 0
Explanation
new int[2][3] creates a 2-row, 3-column array. m.length is rows = 2, m[0].length is columns = 3.
AP Computer Science A· difficulty 2/5
int[][] m = new int[2][3];
System.out.println(m.length + " " + m[0].length);What is printed?
2 3
3 2
2 2
6 0
Explanation
new int[2][3] creates a 2-row, 3-column array. m.length is rows = 2, m[0].length is columns = 3.
Want 10 more like this — adaptive to your weak spots?