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 www . j a va 2 s . c o 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(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; } }