Here you can find the source of join(List
public static String join(List<Object> list)
//package com.java2s; import java.util.List; public class Main { public static String join(List<Object> list) { StringBuilder sb = new StringBuilder(); for (Object x : list) { sb.append(x.toString());/*from ww w .ja v a2 s . com*/ } return sb.toString(); } public static String join(String s) { return s; } }