Here you can find the source of join(Object[] array, String linker)
public static String join(Object[] array, String linker)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String join(Object[] array, String linker) { StringBuilder stringBuilder = new StringBuilder(); if (null == array || 0 == array.length) { return stringBuilder.toString(); }/*from w w w. j a v a2s. c o m*/ stringBuilder.append(array[0]); for (int i = 1; i < array.length; i++) { stringBuilder.append(linker).append(array[i]); } return stringBuilder.toString(); } @SuppressWarnings("rawtypes") public static String join(List list, String linker) { return join(list.toArray(), linker); } }