Sunday, 18 August 2013

Java LinkedList remove

Java LinkedList remove

fast question.If I remove element from LinkedList like this
playerDeck.remove(0);
or like this
playerDeck.removeFirst();
does first element of list will be empty space? or all list slide to up
and first element will be the one who was second? example: Linked list:
4
5
6
8
after remove 4, list it will be
null
5
6
8
or ?
5
6
8

No comments:

Post a Comment