Java tutorial
//package com.java2s; public class Main { public static String joinArray(String[] array, String separator) { if (null == array || array.length <= 0) { return ""; } StringBuilder sb = new StringBuilder(); for (String s : array) { sb.append(separator).append(s); } return sb.toString().substring(separator.length()); } }