Here you can find the source of combineString(String[] strArr, String glue)
public static String combineString(String[] strArr, String glue)
//package com.java2s; //License from project: Creative Commons License public class Main { /**/*from w ww.j a v a 2 s.co m*/ * Combine several substring into one arge String * * @return combined String */ public static String combineString(String[] strArr, String glue) { String retval = ""; for (int i = 0; i < strArr.length; i++) { retval += strArr[i]; if (i < (strArr.length - 1)) { retval += glue; } } return retval; } }