code: private static void setInternal(int[] array, int fromIndex, int toIndex) {
      int first = wordIndex(fromIndex);
      int last = wordIndex(toIndex);
  
      maybeGrowArrayToIndex(array, last);
  
      int startBit = bitOffset(fromIndex);
      int endBit = bitOffset(toIndex);
  
      if (first == last) {
        // Set the bits in between first and last.
        maskInWord(array, first, startBit, endBit);
      } else {
        // Set the bits from fromIndex to the next 31 bit boundary.
        maskInWord(array, first, startBit, BITS_PER_WORD);
  
        // Set the bits from the last 31 bit boundary to toIndex.
        maskInWord(array, last, 0, endBit);
  
        // Set everything in between.
        for (int i = first + 1; i < last; i++) {
          array[i] = WORD_MASK;
        }
      }
    }
docs: Sets all bits to true within the given range.
  
  @param fromIndex The lower bit index.
  @param toIndex The upper bit index.