Here you can find the source of arrayToString(Object[] array)
public static String arrayToString(Object[] array)
//package com.java2s; //License from project: LGPL public class Main { public static String DEFAULT_SEPARATOR = "?"; public static String arrayToString(Object[] array) { return arrayToString(array, DEFAULT_SEPARATOR); }// w w w . j a va 2 s. c o m public static String arrayToString(Object[] array, String inSep) { if (array == null) { return null; } StringBuffer out = new StringBuffer(); String sep = ""; for (Object element : array) { out.append(sep + element); sep = inSep; } return out.toString(); } }