Here you can find the source of concat(List
public static void concat(List<StringBuilder> lista, String sep, StringBuilder destino)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static void concat(List<StringBuilder> lista, String sep, StringBuilder destino) { Iterator<StringBuilder> it = lista.iterator(); while (it.hasNext()) { destino.append(it.next());/*from w w w . j a v a 2 s. c om*/ if (it.hasNext()) { destino.append(sep); } } } }