Page 65 - AP Computer Science A, 7th edition
P. 65
Consider the following method that transforms the matrix in one of the ways shown above:
public static void someMethod(int[][] mat) {
int height = mat.length;
int numCols = mat[0].length;
for (int col = 0; col < numCols; col++)
for (int row = 0; row < height/2; row++) mat[height – row – 1][col] = mat[row] [col];
}