Java tutorial
//package com.java2s; public class Main { /** * Convert collection to string. * * @param items the items * @return the string */ public static String convertCollectionToString(Iterable<?> items) { final StringBuilder sb = new StringBuilder(); String sep = ""; for (final Object item : items) { sb.append(sep).append(item.toString()); sep = ", "; } return sb.toString(); } }