Here you can find the source of arrayToCommaDelimitedString(Object[] arr)
public static String arrayToCommaDelimitedString(Object[] arr)
//package com.java2s; //License from project: Apache License public class Main { public static String arrayToCommaDelimitedString(Object[] arr) { return arrayToDelimitedString(arr, ","); }//w w w . j a va2s .com public static String arrayToDelimitedString(Object[] arr, String delim) { if (arr == null) { return ""; } StringBuffer sb = new StringBuffer(); for (int i = 0; i < arr.length; i++) { if (i > 0) sb.append(delim); sb.append(arr[i]); } return sb.toString(); } }