public static void main(String[] args){
        SpiralMatrix2 test = new SpiralMatrix2();
        int[][] matrix = test.generateMatrix(3);
        for(int i = 0; i < matrix.length; i++){
            for(int j = 0; j < matrix[0].length; j++){
                System.out.print(matrix[i][j] + " ");
            }
            System.out.println();
        }
    }