listing continued //end class link ///////////////////////////////////////////////////////////////class firstlastlist private link first/ref to first link private link last/ref to last link /public firstlastlist(/constructor first null/no links on list yet last null/public boolean isempty(/true if no links return first==null/public void insertfirst(long dd/insert at front of list link newlink new link(dd)/make new link ifisempty(/if empty listlast newlink/newlink <-last newlink next first/newlink --old first first newlink/first --newlink /public void insertlast(long 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 long deletefirst(/delete first link /(assumes non-empty listlong temp first ddataif(first next =null/if only one item