Here you can find the source of getAsCommaDelimitedString(List> coll)
public static String getAsCommaDelimitedString(List<?> coll)
//package com.java2s; import java.util.Iterator; import java.util.List; public class Main { public static String getAsCommaDelimitedString(List<?> coll) { StringBuffer strBuffer = new StringBuffer(); for (Iterator<?> iter = coll.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj != null) { strBuffer.append(obj.toString()); strBuffer.append(","); }/*from w w w. j a v a2s. c o m*/ } return strBuffer.toString(); } }