java_linkedlist.getfirst
Java LinkedList.getFirst()
Java LinkedList.getFirst() is a method in the Java LinkedList class that retrieves the first element in the list without removing it. If the list is empty, it throws a Java NoSuchElementException. Introduced in Java 1997 with Java 1.2, getFirst() is commonly used in deque-based structures or when the head of the list is the most important element.
https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html
java_linkedlist.getfirst.txt · Last modified: 2025/02/01 06:48 by 127.0.0.1