linked lists iter nextlink()alink iter getcurrent()if(alink ddata = iter deletecurrent()thelist displaylist()/end main(/end class interiterapp /go to next link /get link /if divisible by /delete it /display list we insert five links and display the list then we iterate through the listdeleting those links with keys divisible by and display the list again here' the output againalthough we don' show it hereit' important to check whether the list is empty before calling deletecurrent(other methods you could create other useful methods for the listiterator class for examplea find(method would return an item with specified key valueas we've seen when find(is list method replace(method could replace items that had certain key values with other items because it' singly linked listyou can iterate along it only in the forward direction if doubly linked list were usedyou could go either wayallowing operations such as deletion from the end of the listjust as with non-iterators this capability would probably be convenience in some applications summary linked list consists of one linkedlist object and number of link objects the linkedlist object contains referenceoften called firstto the first link in the list each link object contains data and referenceoften called nextto the next link in the list next value of null signals the end of the list inserting an item at the beginning of linked list involves changing the new link' next field to point to the old first link and changing first to point to the new item