code: private static void check(Vector a, Vector b) {
          if (a.length() != b.length())
              throw new IllegalArgumentException(
                      "input vector lengths do not match");
      }
docs: Throws an exception if either {@code Vector} is {@code null} or if the
  {@code Vector} lengths do not match.