code: public boolean get(int index) {
          if(index < 0 || index >= size)
              throw new IndexOutOfBoundsException("index: " + index);
  
          int wordIndex=wordIndex(index);
          return (words[wordIndex] & (1L << index)) != 0;
      }
docs: Returns the value of the bit with the specified index. The value
  is {@code true} if the bit with the index {@code index}
  is currently set in this bit set; otherwise, the result is {@code false}.
  @param index the bit index.
  @return the value of the bit with the specified index.
  @throws IndexOutOfBoundsException if the specified index is negative.