text: public void remove() {if (this.lastPosition == -1) {throw new IllegalStateException();}if (expectedModCount != modCount) {throw new ConcurrentModificationException();}try {AbstractList.this.remove(lastPosition);} catch (IndexOutOfBoundsException e) {throw new ConcurrentModificationException();}expectedModCount = modCount;if (pos == lastPosition) {pos--;}lastPosition = -1;}