/constructor first null/no items on list yet last null/public boolean isempty(/true if no links return first==null/public void insertlast(double dd/insert at end of list link newlink new link(dd)/make new link ifisempty(/if empty listfirst newlink/first --newlink else last next newlink/old last --newlink last newlink/newlink <-last /public double deletefirst(/delete first link /(assumes non-empty listdouble temp first ddataif(first next =null/if only one item last null/null <-last first first next/first --old next return temp/public void displaylist(link current first/start at beginning while(current !null/until end of listcurrent displaylink()/print data current current next/move to next link system out println("")//end class firstlastlist ///////////////////////////////////////////////////////////////