Here you can find the source of join(final String separator, final String... strings)
public static String join(final String separator, final String... strings)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static String join(final String separator, final String... strings) { String output = ""; for (int i = 0; i < strings.length; i++) { String s = strings[i]; output += s;//from w w w. j a v a2s . c o m if (i < strings.length - 1) { output += separator; } } return output; } public static String join(String separator, List<String> strings) { return join(separator, strings.toArray(new String[strings.size()])); } }