nimo frey wrote:yes, I had only one element in the list.
Then that explains it. The call to remove is done when you're actually done iterating.
When I have to change a object within a loop by getter/setter, do I need the Iterator, too? Or do I need it only when removing objects from the Set?
You can't add using an Iterator (only with ListIterator), so removing is all you can do with it. If you need to add while iterating you will need a copy of the Set, and add to that.