Here you can find the source of concat(String separator, Collection args)
public static String concat(String separator, Collection args)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static String concat(String separator, Collection args) { StringBuilder sb = new StringBuilder(); for (Object arg : args) { sb.append(separator).append(arg); }//www . java 2 s . c o m if (sb.length() > 0) { sb.delete(0, separator.length()); } return sb.toString(); } }