code: static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) {
          out.println(name);
          checkLen(expectedLen, array2d.length);
          out.println(TABLE_START_DECL + " ");
          int i = 0;
          for(double[] array : array2d) { // "double array[]" causes PMD parsing error
              out.print("        {");
              for(double d : array) { // assume inner array has very few entries
                  out.printf("%-25.25s", format(d)); // multiple entries per line
              }
              out.println("}, // " + i++);
          }
          out.println(TABLE_END_DECL);
      }
docs: Print an array.
  @param out text output stream where output should be printed
  @param name array name
  @param expectedLen expected length of the array
  @param array2d array data