class Solution
{
//Function to interchange the rows of a matrix.
static void interchangeRows(int matrix[][])
{
for(int i=0;i<matrix.length/2;i++){
for(int j=0;j<matrix[i].length;j++){
int temp=matrix[i][j];
matrix[i][j]=matrix[matrix.length-i-1][j];
matrix[matrix.length-i-1][j]=temp;
}
}
}
}