@@ -0,0 +1,1067 @@
+class Solution %7B%0A    public void rotate(int%5B%5D%5B%5D matrix) %7B%0A        int n = matrix.length - 1;%0A        int mid = matrix.length / 2;%0A%0A        int temp1, temp2, temp3;%0A        // %E5%9D%90%E6%A0%87%E5%8F%98%E5%8C%96(x, y) -%3E (y, -x)%0A        // %E6%B3%A8%E6%84%8F%EF%BC%9A %E9%81%BF%E5%85%8D%E9%87%8D%E5%A4%8D%EF%BC%8C %E8%BD%AC1/4%0A%0A        printAll(matrix);%0A        for (int i = 0; i %3C mid +  matrix.length %25 2; i++) %7B%0A            for(int j = 0; j %3C mid; j++) %7B%0A                temp1 = matrix%5Bj%5D%5Bn - i%5D;%0A                temp2 = matrix%5Bn - i%5D%5Bn - j%5D;%0A                temp3 = matrix%5Bn -j%5D%5Bi%5D;%0A%0A                matrix%5Bj%5D%5Bn - i%5D = matrix%5Bi%5D%5Bj%5D;                %0A                matrix%5Bn - i%5D%5Bn - j%5D = temp1;%0A                matrix%5Bn -j%5D%5Bi%5D = temp2;%0A                matrix%5Bi%5D%5Bj%5D = temp3;%0A            %7D%0A        %7D%0A%0A        // printAll(matrix);%0A        return;%0A    %7D%0A%0A    private void printAll(int%5B%5D%5B%5D matrix) %7B%0A        for (int i = 0; i %3C matrix.length; i++) %7B%0A            for(int j = 0; j %3C matrix.length; j++) %7B%0A                System.out.printf(%22%25d %22, matrix%5Bi%5D%5Bj%5D);%0A            %7D%0A            System.out.println();%0A        %7D%0A        System.out.println();%0A%0A        return;%0A    %7D%0A%7D%0A

Create RotateMatrix.java