public static String join ( String separator , List < String > topicsArray ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < topicsArray . size ( ) ; i ++ ) { if ( sb . length ( ) > 0 ) { sb . append ( "," ) ; } sb . append ( topicsArray . get ( i ) ) ; } return sb . toString ( ) ; }
Joins a list of Strings