aspose file tools
The moose likes Java in General and the fly likes Concurrent Modification Exception Error. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Concurrent Modification Exception Error." Watch "Concurrent Modification Exception Error." New topic
Author

Concurrent Modification Exception Error.

Philip Zac
Ranch Hand

Joined: Apr 27, 2008
Posts: 66
hello all,

I am trying to figure out the error in my code. So far i couldnt find out. I have gone through other people's post and reply.



From other post, I do understand that it is impossible to add during iteration. Is there any other way to add a collection?

Just to inform you that hotelWizardBean is a collections of list and objects .

Any help will be grateful.
thanks
Philip
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35254
    
    7
This happens if the underlying collection is modified structurally during the iteration (as the add method does). You can use a ListIterator instead of an Iterator; it has methods that can modify the underlying collection during the iteration (provided the collection allows that).


Android appsImageJ pluginsJava web charts
Rodrigo Lopes
Ranch Hand

Joined: Feb 29, 2008
Posts: 118
You don't need to add the plan again in the list.
It is already in the list.
Philip Zac
Ranch Hand

Joined: Apr 27, 2008
Posts: 66
Thank you Rodrigo Lopes and Ulf for the quickest reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Concurrent Modification Exception Error.
 
Similar Threads
PagingScrollTable Javascript error
JToolBar - setRollover and alignment
Taking an element out of an array
Sorting array's
'void' type not allowed here