code: public static void sameLength(final Object[] array1, final Object[] array2, final String array1Name, final String array2Name) {
          notNull(array1, array1Name);
          notNull(array2, array2Name);
  
          if (array1.length != array2.length) {
              throw new IllegalArgumentException("expecting " + maskNullArgument(array1Name) + " to have the same length as " + maskNullArgument(array2Name));
          }
      }
docs: Checks that the arrays have the same number of elements, otherwise throws and exception
  @param array1 the first array
  @param array2 the second array
  @param array1Name the name of the first array
  @param array2Name the name of the second array
  @throws IllegalArgumentException if array1 or array2 are null or if the arrays don't agree on the number of elements