Here you can find the source of join(Collection items)
public static String join(Collection items)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static String join(Collection items) { StringBuilder result = new StringBuilder(); boolean first = true; for (Object o : items) { if (!first) { result.append(","); }//w w w . j a v a 2 s .c o m if (o != null) { result.append(o); } first = false; } return result.toString(); } }