Here you can find the source of join(Object[] arguments)
public static String join(Object[] arguments)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.Iterator; import java.util.List; public class Main { public static String join(Object[] arguments) { return join(Arrays.asList(arguments)); }//from w ww . j a va 2s . c om public static String join(Object[] arguments, String glue) { return join(Arrays.asList(arguments), glue); } public static String join(List<Object> arguments) { return join(arguments, ", "); } public static String join(List<Object> arguments, String glue) { if (arguments == null) { return ""; } StringBuilder output = new StringBuilder(); Iterator<Object> it = arguments.iterator(); while (it.hasNext()) { output.append(it.next().toString()); if (it.hasNext()) { output.append(glue); } } return output.toString(); } }