Guest User

Untitled

a guest
Jan 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public E removeFront() {
  2. if (isEmpty())
  3. throw new EmptyListException();
  4.  
  5. E removedItem = firstNode.getData();
  6.  
  7. if(firstNode == lastNode)
  8. firstNode = lastNode = null;
  9. else
  10. firstNode = firstNode.getNext();
  11.  
  12. return removedItem;
  13. }
Add Comment
Please, Sign In to add comment