The Iterator function removes () may delete an element from a Collection. The current element in the Collection is removing using this function. If the remove() method is not follow by the next() method, the IllegalStateException exception is thrown.