inputstreamreader isr new inputstreamreader(system in)bufferedreader br new bufferedreader(isr)string br readline()return //public static int getchar(throws ioexception string getstring()return charat( )//public static int getint(throws ioexception string getstring()return integer parseint( )/end getint(///end class interiterapp the main(routine inserts four items into the listusing an iterator and its insertafter(method then it waits for the user to interact with it in the following sample interactionthe user displays the listresets the iterator to the beginninggoes forward two linksgets the current link' key value (which is )inserts before thisinserts after the and displays the list again enter first letter of showresetnextgetbeforeafterdeletes enter first letter of showresetnextgetbeforeafterdeleter enter first letter of showresetnextgetbeforeafterdeleten enter first letter of showresetnextgetbeforeafterdeleten enter first letter of showresetnextgetbeforeafterdeleteg returned enter first letter of showresetnextgetbeforeafterdeleteb enter value to insert enter first letter of showresetnextgetbeforeafterdeletea enter value to insert enter first letter of showresetnextgetbeforeafterdeletes