insertafter()--inserts new link after the iterator insertbefore()--inserts new link before the iterator deletecurrent()--deletes the link at the iterator the user can position the iterator using reset(and nextlink()check whether it' at the end of the list with atend()and perform the other operations shown deciding which tasks should be carried out by an iterator and which by the list itself is not always easy an insertbefore(method works best in the iteratorbut an insertfirst(routine that always inserts at the beginning of the list might be more appropriate in the list class we've kept displaylist(routine in the listbut this operation could also be handled with getcurrent(and nextlink(calls to the iterator the interiterator java program the interiterator java program includes an interactive interface that permits the user to control the iterator directly after you've started the programyou can perform the following actions by typing the appropriate letters--show the list contents --reset the iterator to the start of the list --go to the next link --get the contents of the current link --insert before the current link --insert new link after the current link --delete the current link listing shows the complete interiterator java program listing the interiterator java program /interiterator java /demonstrates iterators on linked listlistiterator /to run this programc>java interiterapp import java io */for / ///////////////////////////////////////////////////////////////class link public long ddata/data item