Let's say I have a List
object and an iterator for that list.
Now I sort the list with java.util.Collections.sort()
- What happens to the iterator?
- Is its behavior still defined and can it still be used?
- If not, can I prevent destroying the iterators for the list?
I know, this problem could be circumvented by changing the program design, cloning the list for example, but I specificly want to know the "official" behavior of Java.