public static String join ( String [ ] strings , String separator ) { StringBuilder sb = new StringBuilder ( ) ; boolean first = true ; for ( String s : strings ) { if ( first ) { first = false ; } else { sb . append ( separator ) ; } sb . append ( s ) ; } return sb . toString ( ) ; }
Join an array of strings with the given separator .