Here you can find the source of concatenate(List aList)
String
.
protected static String concatenate(List aList)
//package com.java2s; import java.util.Iterator; import java.util.List; public class Main { /**//from w w w.j a v a2 s . c o m * Convenience routine that concatenates the items in the specified list to * a <code>String</code>. */ protected static String concatenate(List aList) { StringBuffer buffer = new StringBuffer(); Iterator i = aList.iterator(); if (i.hasNext()) { // Get the first item. buffer.append(i.next()); // Concatenate succeeding items separated by spaces. while (i.hasNext()) { buffer.append(' '); buffer.append(i.next()); } } return buffer.toString(); } }