Here you can find the source of joinString(java.util.List
public static String joinString(java.util.List<String> values, String delimiter)
//package com.java2s; // This copy of Ice is licensed to you under the terms described in the public class Main { public static String joinString(java.util.List<String> values, String delimiter) { StringBuffer s = new StringBuffer(); boolean first = true; for (String v : values) { if (!first) { s.append(delimiter);/* w ww .java 2 s . c o m*/ } s.append(v); first = false; } return s.toString(); } }