How to use ArrayList and ListIterator in Java - post added