linked lists first last next next next next prev prev prev prev null null figure doubly linked list the beginning of the specification for the link class in doubly linked list looks like thisclass link public long ddatapublic link nextpublic link previous/data item /next link in list /previous link in list the downside of doubly linked lists is that every time you insert or delete link you must deal with four links instead of twotwo attachments to the previous link and two attachments to the following one alsoof courseeach link is little bigger because of the extra reference doubly linked list doesn' necessarily need to be double-ended list (keeping reference to the last element on the listbut creating it this way is usefulso we'll include it in our example we'll show the complete listing for the doublylinked java program soonbut first let' examine some of the methods in its doublylinkedlist class traversal two display methods demonstrate traversal of doubly linked list the displayforward(method is the same as the displaylist(method we've seen in ordinary linked lists the displaybackward(method is similar but starts at the last element in the list and proceeds toward the start of the listgoing to each element' previous field this code fragment shows how this process workslink current lastwhile(current !nullcurrent current previous/start at end /until start of list/move to previous link