Here you can find the source of toString(int X[][])
public static String toString(int X[][])
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static String toString(int X[][]) { StringBuffer res = new StringBuffer("{"); for (int row[] : X) { if (row != X[0]) { res.append(", "); }/* w w w. ja va 2 s . c om*/ res.append(Arrays.toString(row)); } res.append("}"); return res.toString(); } }