listing linked lists continued public long deletefirst(/delete first link /(assumes non-empty listlong 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 ///////////////////////////////////////////////////////////////class linkqueue private firstlastlist thelist//public linkqueue(/constructor thelist new firstlastlist()/make -ended list //public boolean isempty(/true if queue is empty return thelist isempty()//public void insert(long /insertrear of queue thelist insertlast( )//public long remove(/removefront of queue return thelist deletefirst()//public void displayqueue(system out print("queue (front-->rear)")