public static String join ( String delimiter , String ... parts ) { if ( parts == null ) { return null ; } if ( delimiter == null ) { delimiter = "" ; } StringBuilder stringBuilder = new StringBuilder ( ) ; for ( int i = 0 ; i < parts . length ; i ++ ) { if ( i > 0 ) { stringBuilder . append ( delimiter ) ; } stringBuilder . append ( parts [ i ] ) ; } return stringBuilder . toString ( ) ; }
Joins a list of Strings to a single one .