标签: java multidimensional-array
{{1, 2},{2, 3}, {3, 4}};
如何反转每个子数组的索引1处的值以将数组更改为:
{{1, 4},{2, 3}, {3, 2}};
答案 0 :(得分:0)
for (int i=0;i<a.length;i++) { b[i][0] = a[i][0]; b[i][1] = a[a.length-i-1][1]; System.out.println(b[i][0] + " " + b[i][1]); }