Here you can find the source of join(Collection> strs)
public static String join(Collection<?> strs)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static String join(Collection<?> strs) { StringBuilder sb = new StringBuilder(); for (Object str : strs) { sb.append(str);/*from w ww .ja v a 2 s . co m*/ } return sb.toString(); } public static String join(Object... strs) { StringBuilder sb = new StringBuilder(); for (Object str : strs) { sb.append(str); } return sb.toString(); } }