# | Line 258 | Line 258 | public class LinkedList<E> | |
---|---|---|
258 | * @return the last element in this list | |
259 | * @throws NoSuchElementException if this list is empty | |
260 | */ | |
261 | < | public E getLast() { |
261 | > | public E getLast() { |
262 | final Node<E> l = last; | |
263 | if (l == null) | |
264 | throw new NoSuchElementException(); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |