question: public static String toSepList ( Iterator stringIter , String sep ) { StringBuilder sb = new StringBuilder ( ) ; if ( stringIter . hasNext ( ) ) { sb . append ( ( String ) stringIter . next ( ) ) ; } while ( stringIter . hasNext ( ) ) { sb . append ( sep ) ; sb . append ( ( String ) stringIter . next ( ) ) ; } return sb . toString ( ) ; }
target:  Takes iterator over String, and separator string, and returns a separated list as String, e.g. ["a","b","c"] and ", " -> "a, b, c"