experimenting with the interiterator java program will give you feeling for how the iterator moves along the links and how it can insert and delete links anywhere in the list where does it pointone of the design issues in an iterator class is deciding where the iterator should point following various operations when you delete an item with deletecurrent()should the iterator end up pointing to the next itemto the previous itemor back at the beginning of the listit' convenient to keep it in the vicinity of the deleted itembecause the chances are the class user will be carrying out other operations there howeveryou can' move it to the previous item because there' no way to reset the list' previous field to the previous item (you' need doubly linked list for that our solution is to move the iterator to the link following the deleted link if we've just deleted the item at the end of the listthe iterator is set to the beginning of the list following calls to insertbefore(and insertafter()we return with current pointing to the newly inserted item the atend(method there' another question about the atend(method it could return true when the iterator points to the last valid link in the listor it could return true when the iterator points past the last link (and is thus not pointing to valid linkwith the first approacha loop condition used to iterate through the list becomes awkward because you need to perform an operation on the last link before checking whether it is the last link (and terminating the loop if it ishoweverthe second approach doesn' allow you to find out you're at the end of the list until it' too late to do anything with the last link (you couldn' look for the last link and then delete itfor example this is because when atend(became truethe iterator would no longer point to the last link (or indeed any valid link)and you can' "back upthe iterator in singly linked list we take the first approach this way the iterator always points to valid linkalthough you must be careful when writing loop that iterates through the listas we'll see next iterative operations as we notedan iterator allows you to traverse the listperforming operations on certain data items here' code fragment that displays the list contentsusing an iterator instead of the list' displaylist(methoditer reset()double value iter getcurrent(ddatasystem out println(value ")while!iter atend(iter nextlink()linkdouble value iter getcurrent(ddatasystem out println(value ") /start at first /display link /until end/go to next /display it