code: private void grow(int minCapacity) {
          int oldCapacity = queue.length;
          // Double size if small; else grow by 50%
          int newCapacity = oldCapacity + ((oldCapacity < 64) ?
                                           (oldCapacity + 2) :
                                           (oldCapacity >> 1));
          // overflow-conscious code
          if (newCapacity - MAX_ARRAY_SIZE > 0)
              newCapacity = hugeCapacity(minCapacity);
          queue = Arrays.copyOf(queue, newCapacity);
      }
docs: Increases the capacity of the array.
  
  @param minCapacity the desired minimum capacity