public E poll() {
final Node<E> f = first;
return (f == null) ? null : unlinkFirst(f);
}
Hi, I am reading the JDK 1.7 source code. In the above code snippet in LinkedList.java, I canβt understand why I need βfinalβ in the poll () method. Why not:
public E poll() {
return (first == null) ? null : unlinkFirst(first);
}
Can you share an understanding of the implementation? Thank.
source
share