Here you can find the source of join(String delimiter, List
public static String join(String delimiter, List<String> strings)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static String join(String delimiter, List<String> strings) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < strings.size(); i++) { String part = strings.get(i); if (i != 0) stringBuilder.append(delimiter); stringBuilder.append(part);//w w w. j a va 2s. c o m } return stringBuilder.toString(); } }