|
||
|
|||
|
Dear All,
I have a problem on using the iterator. Why should I run “iter = myList.iterator();” one more time in order to get the correct results in TestLinkedList.java? Please find the attached file for your reference. Thank you very much! Best Regards, Chris.
|
|
|||
|
The iterator should not be re-used after a collection has been modified, in fact according to the java API if you try to use the iterator after the collection has been modified a ConcurrentModificationException may be thrown. As per the java API:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Iterator, with ArrayList | rsala004 | Collections and Generics | 3 | 25-10-2009 02:00 PM |
|
100 most searched terms
Search Cloud
|
| 2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java actionlistener java actionlistener jbutton addactionlistener addactionlistener java avatar hardware id convert double to integer java double format java double to int java double to integer in java double to integer java eclipse shortcut keys eclipse tutorial for beginners exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.outofmemoryerror: java heap space format double java get mouse position java hardware id avatar java 2 dimensional arraylist java 2d arraylist java actionlistener java addactionlistener java button actionlistener java convert double to int java convert list to map java double format java double to int java double to integer java for beginner eclippse java format double java forum java forums java get mouse position java jbutton java list to map java mouse position java programming forum java programming forums java sendkeys java.lang.reflect.invocationtargetexception java.util.arraylist jbutton actionlistener jbutton java programming forums string to int java two dimensional arraylist java writing apps for ipod touch |