class Solution { //Function to exchange first column of a matrix with its last column. static void exchangeColumns(int matrix[][]) { int temp = 0; for (int i=0; i<matrix.length; i++) { temp = matrix[i][0]; matrix[i][0] = matrix[i][matrix[i].length-1]; matrix[i][matrix[i].length-1] = temp; } } }