code: public void forEach(DoubleConsumer consumer) {
      checkNotNull(consumer);
      for (int i = start; i < end; i++) {
        consumer.accept(array[i]);
      }
    }
docs: Invokes {@code consumer} for each value contained in this array, in order.