Here you can find the source of joinString(String[] array)
public static String joinString(String[] array)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { public static String joinString(String[] array) { return joinString(Arrays.asList(array), ","); }//from w ww .j ava2 s .c om public static String joinString(String[] array, String seperator) { return joinString(Arrays.asList(array), seperator); } public static String joinString(List<String> array) { return joinString(array, ","); } public static String joinString(List<String> array, String seperator) { StringBuilder ret = new StringBuilder(); for (String part : array) { if (ret.length() > 0) { ret.append(seperator); } ret.append(part); } return ret.toString(); } }