public static String flatten ( List lines , String sep ) { return flatten ( lines . toArray ( new Object [ lines . size ( ) ] ) , sep ) ; }
Flattens the list into a single long string . The separator string gets added between the objects but not after the last one .