Here you can find the source of join(String delimiter, String... items)
public static String join(String delimiter, String... items)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { public static String join(String delimiter, String... items) { return join(delimiter, Arrays.asList(items)); }/*from w w w . ja v a2 s. c o m*/ public static String join(String delimiter, List<? extends Object> items) { StringBuilder buffer = new StringBuilder(); if (items != null && items.size() > 0) { buffer.append(items.get(0)); for (int i = 1; i < items.size(); i++) { buffer.append(delimiter).append(items.get(i).toString()); } } return buffer.toString(); } }