Reprint Source: Link
List Overview
Let's take a look at the list in the collection frame chart:
From the diagram we can see that:
1. List is an interface that inherits from the collection interface and represents an ordered queue.
2. Abstractlist is an abstract class that inherits from Abstractcollection. Abstractlist implements methods other than size (), get (int location) in the list interface.
3. Abstractsequentiallist is an abstract class that inherits from Abstrctlist. Abstractsequentiallist implements the "All methods of the list, which manipulate the list according to the index value."
4. ArrayList, LinkedList, vector, and stack are the four implementation classes in the list, where the vector is based on JDK1.0, although it achieves synchronization, but is inefficient and no longer used, stack inheritance and vector, so don't repeat.
5. LinkedList is a two-way linked list that can also be used as a stack, queue, or two-terminal queue. the difference between ArrayList and LinkedList
We know that in general, the difference between ArrayList and LinkedList has the following points:
1. ArrayList is a data structure based on dynamic array, and LinkedList is based on the data structure of the linked list;
2. For random access to get and set,arraylist is better than LinkedList, because linkedlist to move the pointer;
3. For adding and removing operations Add and remove, people generally say linkedlist is faster than ArrayList, because ArrayList to move the data. But the reality is not so, for add or delete, LinkedList and ArrayList does not specify who fast who slow