Here you can find the source of arrayToString(Object[] objs, String separator)
public static String arrayToString(Object[] objs, String separator)
//package com.java2s; public class Main { public static String arrayToString(Object[] objs, String separator) { if (objs == null) { return "[null]"; }//from www .j a va 2 s . co m StringBuffer result = new StringBuffer(); if (objs.length > 0) { result.append(objs[0] != null ? objs[0].toString() : objs[0]); for (int i = 1; i < objs.length; i++) { result.append(separator); result.append(objs[i] != null ? objs[i].toString() : objs[i]); } } return result.toString(); } public static String arrayToString(Object[] objs) { final String separator = ", "; return arrayToString(objs, separator); } }