ddata /constructor /public void displaylink(/display this link system out print(ddata ")//end class link ///////////////////////////////////////////////////////////////class firstlastlist private link firstprivate link last/ref to first link /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(double dd/insert at front of list link newlink new link(dd)/make new link ifisempty(last newlinknewlink next firstfirst newlink/if empty list/newlink <-last /newlink --old first /first --newlink /public void insertlast(double dd/insert at end of list link newlink new link(dd)/make new link ifisempty(first newlinkelse last next newlink/if empty list/first --newlink /old last --newlink