Your ArrayList's size is 1, then you call next() function twice. Exception will occur.
When you call the second time iter.next(), there is null pointer exception due to "null.next"



List...