Here you can find the source of combineStringArray(String[] array, String delim)
public static final String combineStringArray(String[] array, String delim)
//package com.java2s; public class Main { public static final String combineStringArray(String[] array, String delim) { int length = array.length - 1; if (delim == null) { delim = ""; }/* w ww . j a va2 s . co m*/ StringBuffer result = new StringBuffer(length * 8); for (int i = 0; i < length; i++) { result.append(array[i]); result.append(delim); } result.append(array[length]); return result.toString(); } }