D Swart wrote:- Is there a way to get the current element in the ArrayList without moving to the next element the way iter.next() does?
The only other way is to use indexes directly. An iterator is better since it will be better if you decide to switch to a LinkedList.
- If I want to write a value back to the list that is being iterated over, how do I do this?
If you are using an Iterator, switch to using a ListIterator instead (use the listIterator() method). That one has methods for adding and replacing elements.
If you are using an index you can just use the List's add methods.