Here you can find the source of joinStrings(String delim, List> strings)
public static String joinStrings(String delim, List<?> strings)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String joinStrings(String delim, List<?> strings) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < strings.size(); ++i) { sb.append(strings.get(i).toString()); if (i < strings.size() - 1) { sb.append(delim);//from w ww . ja v a 2 s . com } } return sb.toString(); } }