Java tutorial
//package com.java2s; import java.util.Collection; public class Main { public static String join(Collection<String> c, String sep) { StringBuilder sb = new StringBuilder(); for (String str : c) { sb.append(str + sep); } return sb.toString(); } }