Anonymous
public text v1 · immutablepublic myDLNode<T> getFirst() throws InvalidPositionException {
if(head == null)) {
throw new InvalidPositionException("getFirst.");
}
return (head);
}// throws InvalidPositionException – returns first element in the list; O(1)