Re: Regarding map ina java
You are trying to remove an entry from your map 'behind the back' of the iterator, hence the Exception. A map keeps a 'modifiation counter' and increments it each time the map is modified. When an Iterator is instantiated it registers this modification count. Each time an Iterator has to do something it compares the map's modification counter and its own version; when they differ the map was modified 'behind the back' of the Iterator and it throws an Exception. Read the API for the Iterator interface: an Iterator can (optionally) remove an entry from the Collection it iterates over ...