Here you can find the source of implodeArray(String[] inputArray, String glueString)
public static String implodeArray(String[] inputArray, String glueString)
//package com.java2s; //License from project: Creative Commons License public class Main { public static String implodeArray(String[] inputArray, String glueString) { /** Output variable */ String output = ""; if (inputArray.length > 0) { StringBuilder sb = new StringBuilder(); sb.append(inputArray[0]);/*from w w w. j a v a2s.co m*/ for (int i = 1; i < inputArray.length; i++) { sb.append(glueString); sb.append(inputArray[i]); } output = sb.toString(); } return output; } }