Here you can find the source of join(String[] strings, char delimiter)
public static String join(String[] strings, char delimiter)
//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[] strings, char delimiter) { if (strings == null) { return null; }/* w w w.j av a 2 s . c om*/ List<String> stringsAsList = Arrays.asList(strings); return join(stringsAsList, delimiter); } public static String join(List<String> strings, char delimiter) { if (strings == null) { return null; } StringBuilder retString = new StringBuilder(); if (!strings.isEmpty()) { for (int i = 0; i < strings.size() - 1; i++) { retString.append(strings.get(i)); retString.append(delimiter); } retString.append(strings.get(strings.size() - 1)); } return retString.toString(); } }