Java.util.LinkedList
LinkedList is a doubly-linked list implementation that implements the list interface, owns all of the list's methods, and allows all elements (including null).
A doubly linked list is also called a doubly linked list, which is a list of two pointers in each data node, pointing directly to successive and direct precursors respectively. So, starting from any node in a doubly linked list, it is easy to access its predecessor and successor nodes. In general, we construct two-way circular linked lists.
It is important to note that LinkedList is non-synchronous when a large number of threads concurrently access the linked list, when at least one thread modifies the structure of the listing, it must be externally synchronized (structural modification refers to the
Adding or removing actions for one or more elements, setting the value simply cannot be a modification of the list structure. Synchronization is typically achieved by encapsulating some objects in the list.
If no such object exists, the list should be synchronized using the Collections.synchronizedlist method. This is best used when creating a list, for
Prevent accidental non-synchronous access to this list:
List List = Collections.synchronizedlist (new LinkedList (...));
Returning iterators by calling the iterator and Listiterator methods will immediately give an error when the following occurs: modify their structure at any time after the iterator is created
The iterator throws a concurrentmodificationexception in any way except through the iterator's own remove or add. Therefore, if the synchronization operation is not performed,
In the face of concurrency, iterators can fail quickly and completely.
public class Linkedlist<e> extends abstractsequentiallist<e>
Implements List<e>, Deque<e>, Cloneable, java.io.Serializable
{
Likedlist is a class that implements the list interface and is capable of serializing operations (implementing the Java.io.Serializable interface).
Java source reading (constantly added)