how to delete the last element of a collection without iterating it?
If you know the object you can use remove(Object o) and pass the object to remove, otherwise, from the
docs you can change the Iterator to an array first with the toArray method and remove the last object in the array.