| Author |
how to delete the map elements when iterating the map
|
jing hu
Ranch Hand
Joined: Jun 30, 2009
Posts: 63
|
|
I want to delete some elements when iterating the map.
Like this.
but it will fail and throw java.util.ConcurrentModificationException. So How can I modify the map when iterating it.
I want to know a convenient method which do not need many codes.
Thanks
|
 |
Aurelian Tutuianu
Ranch Hand
Joined: May 13, 2004
Posts: 86
|
|
replace line 19 with:
|
http://javasign.blogspot.com/
|
 |
jing hu
Ranch Hand
Joined: Jun 30, 2009
Posts: 63
|
|
|
Thanks, I get it.
|
 |
 |
|
|
subject: how to delete the map elements when iterating the map
|
|
|