Mega Code Archive

 
Categories / Java Book / 005 Collection
 

0281 Peek the element

E element() Retrieves, but does not remove, the head (first element) of this list. E peek() Retrieves, but does not remove, the head (first element) of this list. E peekFirst() Retrieves, but does not remove, the first element of this list, or returns null if this list is empty. E peekLast() Retrieves, but does not remove, the last element of this list, or returns null if this list is empty.