public static String formatCommaSeparatedList ( List < String > list ) { StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { if ( i != 0 ) { builder . append ( "," ) ; } builder . append ( list . get ( i ) ) ; } return builder . toString ( ) ; }
Format a comma separated list of the given list .