Here you can find the source of arrayToDelimitedString(String[] values, String delimiter)
public static String arrayToDelimitedString(String[] values, String delimiter)
//package com.java2s; //License from project: Open Source License public class Main { public static String arrayToDelimitedString(String[] values, String delimiter) { StringBuffer str = new StringBuffer(); for (String val : values) { if (str.length() > 0) { str.append(delimiter);/*from w w w .j av a 2 s .c om*/ } str.append(val); } return str.toString(); } }