Here you can find the source of join(List
public static String join(List<String> args, String seperator)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String join(List<String> args, String seperator) { return join(args.toArray(new String[0]), seperator); }/*www.j a v a 2 s. c o m*/ public static String join(String[] args, String seperator) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < args.length; i++) { if (i != 0) { builder.append(seperator); } builder.append(args[i]); } return builder.toString(); } }