listing linked lists continued system out println("")//end class doublylinkedlist ///////////////////////////////////////////////////////////////class doublylinkedapp public static void main(string[args/make new list doublylinkedlist thelist new doublylinkedlist()thelist insertfirst( )thelist insertfirst( )thelist insertfirst( )/insert at front thelist insertlast( )thelist insertlast( )thelist insertlast( )/insert at rear thelist displayforward()thelist displaybackward()/display list forward /display list backward thelist deletefirst()thelist deletelast()thelist deletekey( )/delete first item /delete last item /delete item with key thelist displayforward()/display list forward thelist insertafter( )thelist insertafter( )/insert after /insert after thelist displayforward()/display list forward /end main(/end class doublylinkedapp ///////////////////////////////////////////////////////////////in main(we insert some items at the beginning of the list and at the enddisplay the items going both forward and backwarddelete the first and last items and the item with key display the list again (forward only)insert two items using the insertafter(methodand display the list again here' the output