Here you can find the source of concatinateStrings(List
public static String concatinateStrings(List<String> strList, String delim)
//package com.java2s; /*L// w w w.j av a 2 s .c om * Copyright SAIC * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/stats-application-commons/LICENSE.txt for details. */ import java.util.Iterator; import java.util.List; public class Main { public static String concatinateStrings(List<String> strList, String delim) { StringBuffer sb = new StringBuffer(); for (Iterator i = strList.iterator(); i.hasNext();) { sb.append(i.next()); if (i.hasNext()) sb.append(delim); } return sb.toString(); } }