Here you can find the source of array2str(String[] array, String delim)
public static String array2str(String[] array, String delim)
//package com.java2s; //License from project: Open Source License public class Main { public static String array2str(String[] array, String delim) { StringBuffer s = new StringBuffer(); for (int i = 0; i < array.length; i++) { if (i != 0) { s.append(delim);//from ww w . j a v a 2 s .com } s.append(array[i]); } return s.toString(); } }