📜  矩阵的转置java代码示例

📅  最后修改于: 2022-03-11 14:52:22.461000             🧑  作者: Mango

代码示例2
for (int row = 0; row < matrix.length; row++) {
    
   for (int col = row; col < matrix[row].length; col++) 
   {
        // Swap 
         int data = matrix[row][col];
        matrix[row][col] = matrix[col][row];
           matrix[col][row] = data;
   }
  
  }