Here you can find the source of createDelimitedString(Iterable iterable, String delimiter)
public static String createDelimitedString(Iterable iterable, String delimiter)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; public class Main { public static String createDelimitedString(Iterable iterable, String delimiter) { Iterator iter = iterable.iterator(); String string = ""; while (iter.hasNext()) { string += iter.next();/*from w w w . j av a 2s. com*/ if (iter.hasNext()) string += delimiter; } return string; } }