Here you can find the source of merge(String[] src, String delimiter)
public static String merge(String[] src, String delimiter)
//package com.java2s; //License from project: Apache License public class Main { public static String merge(String[] src, String delimiter) { StringBuffer newSrc = new StringBuffer(); for (int i = 0; i < src.length; i++) { if (i < src.length - 1) { newSrc.append(src[i]).append(delimiter); } else { newSrc.append(src[i]);/*from w w w. ja v a2 s.c o m*/ } } return newSrc.toString(); } }