Here you can find the source of printArray(double[][] in)
public static final String printArray(double[][] in)
//package com.java2s; //License from project: Apache License public class Main { public static final String printArray(double[][] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[0].length; j++) { out += in[i][j] + " "; }/*from w w w . j a v a 2 s . co m*/ out += "\n"; } return out; } public static final String printArray(double[] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { out += in[i] + " "; } return out; } public static final String printArray(boolean[] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { if (in[i]) out += "1 "; else out += "0 "; } return out; } public static final String printArray(float[][] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[0].length; j++) { out += in[i][j] + " "; } out += "\n"; } return out; } public static final String printArray(float[] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { out += in[i] + " "; } return out; } public static final String printArray(long[][] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { for (int j = 0; j < in[0].length; j++) { out += in[i][j] + " "; } out += "\n"; } return out; } public static final String printArray(long[] in) { if (in == null) return "null"; String out = ""; for (int i = 0; i < in.length; i++) { out += in[i] + " "; } return out; } }