code: public static String format(double[][] d, String pre, String pos, String csep, NumberFormat nf) {
      return d == null ? "null" : (d.length == 0) ? "" : //
          formatTo(new StringBuilder(), d, pre, pos, csep, nf).toString();
    }
docs: Formats the array of double arrays d with 'the specified separators and
  fraction digits.
  
  @param d the double matrix to be formatted
  @param pre Row prefix (e.g. " [")
  @param pos Row postfix (e.g. "]\n")
  @param csep Separator for columns (e.g. ", ")
  @param nf the number format to use
  @return a String representing the double array d