二维数组行列转换就是行号和列号互换
public class Erweishuzubianli {public static void main(String[] args) {int array[][]=new int[][]{{8,75,23},{21,55,34},{15,23,20}};int temp;for(int i=0;i<array.length;i++){for(int j=0;j<array[i].length;j++){temp=array[i][j];array[i][j]=array[j][i];array[j][i]=temp;}}for(int i=0;i<array.length;i++){for(int k=0;k<array[i].length;k++){System.out.print(array[k][i]+" ");}System.out.println();}}}