Java tutorial
//package com.java2s; public class Main { public static String join(String[] arry, String with) { StringBuffer buf = new StringBuffer(); for (String s : arry) { if (buf.length() > 0) { buf.append(with); } buf.append(s); } return buf.toString(); } }