public static String join ( List < String > list , String delim ) { StringBuilder sb = new StringBuilder ( ) ; String loopDelim = "" ; for ( String s : list ) { sb . append ( loopDelim ) ; sb . append ( s ) ; loopDelim = delim ; } return sb . toString ( ) ; }
Joins the given list of strings using the given delimiter delim