Here you can find the source of printArray(int[][] num)
public static void printArray(int[][] num)
//package com.java2s; //License from project: Apache License public class Main { public static void printArray(int[][] num) { //int [][] num={{1,2,3},{4,5},{2}}; for (int i = 0; i < num.length; i++) { for (int j = 0; j < num[i].length; j++) System.out.print(num[i][j] + "\t"); System.out.println(); }/*from ww w . j a v a2 s. c o m*/ } public static void printArray(short[][] num) { //int [][] num={{1,2,3},{4,5},{2}}; for (int i = 0; i < num.length; i++) { for (int j = 0; j < num[i].length; j++) System.out.print(num[i][j] + "\t"); System.out.println(); } } public static void printArray(int[] num) { for (int i = 0; i < num.length; i++) { System.out.print(num[i] + "\t"); } System.out.println(); } public static void printArray(long[] num) { for (int i = 0; i < num.length; i++) { System.out.print(num[i] + "\t"); } System.out.println(); } public static void printArray(double[] num) { for (int i = 0; i < num.length; i++) { System.out.print(num[i] + "\t"); } System.out.println(); } public static void printArray(boolean[][] bs) { for (int i = 0; i < bs.length; i++) { for (int j = 0; j < bs[i].length; j++) { if (bs[i][j]) System.out.print("1\t"); else System.out.print("0\t"); } System.out.println(); } } }