Here you can find the source of join(String[] x)
public static String join(String[] x)
//package com.java2s; import java.util.List; public class Main { /** Join into string */ public static String join(String[] x) { StringBuilder sb = new StringBuilder(); for (String token : x) { sb.append(token).append(" "); }/*from ww w . j a v a 2s . c o m*/ return sb.toString().trim(); } /** Join into string */ public static String join(List<String> x) { StringBuilder sb = new StringBuilder(); for (String token : x) { sb.append(token).append(" "); } return sb.toString().trim(); } }