public static String join ( List < String > strings ) { StringBuilder result = new StringBuilder ( ) ; boolean first = true ; for ( String s : strings ) { if ( ! first ) result . append ( ", " ) ; result . append ( s ) ; first = false ; } return result . toString ( ) ; }
Returns a new string created by joining each of the strings in the specified list together with a comma between them .