Here you can find the source of join(Object[] array, String seperator)
public static String join(Object[] array, String seperator)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String join(List list, String seperator) { return join(list.toArray(new Object[0]), seperator); }/* w ww.jav a 2 s. c o m*/ public static String join(Object[] array, String seperator) { if (array == null) return null; StringBuffer result = new StringBuffer(); for (int i = 0; i < array.length; i++) { result.append(array[i]); if (i != array.length - 1) { result.append(seperator); } } return result.toString(); } }