output Square Matrix - Java java.lang

Java examples for java.lang:Math Algorithm

Description

output Square Matrix

Demo Code


//package com.java2s;

public class Main {
    public static void outputSquare(int[][] square, int n) {
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                System.out.print(square[i][j] + " ");
            }//  w  w  w. j  a v  a 2 s.co m

            System.out.println();
        }
    }
}

Related Tutorials