Here you can find the source of toDelimitedString(Object[] array, String delimiter)
public static String toDelimitedString(Object[] array, String delimiter)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.Iterator; public class Main { public static String toDelimitedString(Object[] array, String delimiter) { return createDelimitedString(Arrays.asList(array), delimiter); }//from w ww.j a v a 2s . c o m public static String createDelimitedString(Iterable iterable, String delimiter) { Iterator iter = iterable.iterator(); String string = ""; while (iter.hasNext()) { string += iter.next(); if (iter.hasNext()) string += delimiter; } return string; } }