linked lists double-ended lists double-ended list is similar to an ordinary linked listbut it has one additional featurea reference to the last link as well as to the first figure shows such list first next next next next null last figure double-ended list the reference to the last link permits you to insert new link directly at the end of the list as well as at the beginning of courseyou can insert new link at the end of an ordinary single-ended list by iterating through the entire list until you reach the endbut this approach is inefficient access to the end of the list as well as the beginning makes the double-ended list suitable for certain situations that single-ended list can' handle efficiently one such situation is implementing queuewe'll see how this technique works in the next section listing contains the firstlastlist java programwhich demonstrates doubleended list (incidentallydon' confuse the double-ended list with the doubly linked listwhich we'll explore later in this listing the firstlastlist java program /firstlastlist java /demonstrates list with first and last references /to run this programc>java firstlastapp ///////////////////////////////////////////////////////////////class link public long ddata/data item public link next/next link in list /public link(long /constructor ddata /public void displaylink(/display this link system out print(ddata ")