Here you can find the source of join(String[] strings, String separator)
public static String join(String[] strings, String separator)
//package com.java2s; public class Main { public static String join(String[] strings, String separator) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < strings.length; i++) { if (i != 0) sb.append(separator);// w w w . ja va 2 s . c om sb.append(strings[i]); } return sb.toString(); } }