public static String flatten(List lines,String sep){
  return flatten(lines.toArray(new Object[lines.size()]),sep);
}

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 .
