Here you can find the source of arrayString(int[] data)
public static String arrayString(int[] data)
//package com.java2s; //License from project: Open Source License public class Main { public static String arrayString(int[] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(data[i] + " "); }//from www .j ava 2 s . c om return buf.toString(); } public static String arrayString(int[][] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(arrayString(data[i]) + "\n"); } return buf.toString(); } public static String arrayString(int[][][] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(arrayString(data[i]) + "\n"); } return buf.toString(); } public static String arrayString(double[] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(data[i] + " "); } return buf.toString(); } public static String arrayString(double[][] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(arrayString(data[i]) + "\n"); } return buf.toString(); } public static String arrayString(String[] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(data[i] + " "); } return buf.toString(); } public static String arrayString(String[][] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { for (int j = 0; j < data[i].length; j++) { buf.append(data[i][j] + " "); } buf.append("\n"); } return buf.toString(); } public static String arrayString(Object[] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { buf.append(data[i] + " "); } return buf.toString(); } public static String arrayString(Object[][] data) { if (data == null) return null; StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { for (int j = 0; j < data[i].length; j++) { buf.append(data[i][j] + " "); } buf.append("\n"); } return buf.toString(); } }