Here you can find the source of printMatrix(int[][] target)
public static void printMatrix(int[][] target)
//package com.java2s; //License from project: Apache License public class Main { public static void printMatrix(int[][] target) { if (target == null) { System.out.println("NULL"); return; }/*from w ww .jav a 2s . c om*/ int n = target.length; for (int i = 0; i < n; i++) { int m = target[i].length; for (int j = 0; j < m; j++) { System.out.print(target[i][j]); System.out.print(" "); } System.out.println(""); } } }