Here you can find the source of concat(List list)
public static String concat(List list)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import java.util.List; public class Main { public static String concat(List list) { if (list.size() > 0) { final StringBuilder result = new StringBuilder(); Iterator iter = list.iterator(); while (iter.hasNext()) { result.append(iter.next().toString()); if (iter.hasNext()) { result.append("."); }// w w w. j a v a 2s .c om } return result.toString(); } else { return ""; } } }