code: public static String flatten(Object[] lines, String sep) {
      StringBuilder	result;
      int			i;
  
      result = new StringBuilder();
  
      for (i = 0; i < lines.length; i++) {
        if (i > 0)
  	result.append(sep);
        result.append(lines[i].toString());
      }
  
      return result.toString();
    }
docs: Flattens the array into a single, long string. The separator string gets
  added between the objects, but not after the last one. Uses the "toString()"
  method of the objects to turn them into a string.
  
  @param lines	the lines to flatten
  @param sep		the separator
  @return		the generated string