Jian, On 11/17/2010 4:19 PM, jian chen wrote: > It seems to me that in java, Iterator can not be modified during the > iteration loop. It is not particular to Velocity though.
http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html#remove() You may need to update your interview questions ;) > If you want to remove elements, maybe during the loop, you could mark the > indexes for the items to be removed, then, remove them afterwards? That's an idea, though much less convenient than calling "remove" on an iterator. Thanks, -chris
signature.asc
Description: OpenPGP digital signature
