Here you can find the source of arrayToString(Object[] a)
public static String arrayToString(Object[] a)
//package com.java2s; //License from project: Open Source License public class Main { public static String arrayToString(Object[] a) { if (a == null) return "null"; int iMax = a.length - 1; if (iMax == -1) return ""; StringBuilder b = new StringBuilder(); for (int i = 0;; i++) { b.append(String.valueOf(a[i])); if (i == iMax) return b.toString(); b.append(", "); }/*from w w w . j a v a 2 s. com*/ } }