Here you can find the source of joinString(List
public static String joinString(List<String> val, String delim)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String joinString(List<String> val, String delim) { StringBuilder builder = new StringBuilder(); for (String l : val) { builder.append(l);/*from ww w. jav a2s .c o m*/ builder.append(","); } return builder.toString().substring(0, builder.toString().length() - 1); } }