Thrown when a method is invoked at an inappropriate time relative to the object's state, for example calling Iterator.remove() before Iterator.next().
IllegalStateException
java Thrown when a method is invoked at an inappropriate time relative to the object's state, for example calling Iterator.remove() before Iterator.next().