Java LinkedList - differences between retrieve operations
Returning null + removing operations: poll(), pollFirst().
Returning null + not removing operations: peek(), peekFirst().
Throwing exception + removing operations: pop(), remove(), removeFirst().
Throwing exception + not removing operations: element(), getFirst().
reference: http://stackoverflow.com/questions/14851367/java-linkedlist-differences-between-retrieve-operations

浙公网安备 33010602011771号