Here you can find the source of arrayToString(Object[] ary)
public static final String arrayToString(Object[] ary)
//package com.java2s; public class Main { /** Converts an array of objects to a string, by concatenating them * together and separated with comma. *//*from ww w . j a v a2s. c o m*/ public static final String arrayToString(Object[] ary) { if (ary == null || ary.length == 0) return ""; final StringBuffer sb = new StringBuffer(50); for (int j = 0; j < ary.length; ++j) { if (j > 0) sb.append(','); if (ary[j] != null) sb.append(ary[j]); } return sb.toString(); } }