Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public E removeFront() {
- if (isEmpty())
- throw new EmptyListException();
- E removedItem = firstNode.getData();
- if(firstNode == lastNode)
- firstNode = lastNode = null;
- else
- firstNode = firstNode.getNext();
- return removedItem;
- }
Add Comment
Please, Sign In to add comment