List is an interface, ArrayList and LinkedList are two implementation classes, they implement the same way, in fact LinkedList is the real chain list (if not clear what is linked list, need to understand the knowledge of related data structure, this is not one or two words can be said clearly), And ArrayList is implemented by an array, which is not a real linked list, it sets an initial capacity of an array at initialization time, and when there is not enough space, it will reconstruct a larger array and then copy the previous elements.
The fundamental difference between ArrayList and LinkedList is the difference between the two data structures: arrays and lists. Refer to the relevant data structure for more information.
Here's a brief summary of what I'm doing here:
ArrayList: Cons: Memory usage is larger, adding delete elements is less efficient. Element random access is highly efficient.
LinkedList: On the contrary.
List,map is an interface
ArrayList is a form of implementation of the list, it is non-thread-safe, while the inside of the things are in the order of addition, and will not automatically give you the sort, you add: 3,5,4 He will not give you a line 345. It is arranged only in the order in which it is added.
HashMap is a form of implementation of map, it is also non-thread-safe, it is unordered, you can add something after the calculation of the hash value in front of the back, he mainly by the form of key and value to obtain
The elements in the list are repeatable
The elements in set are non-repeatable
List is suitable for frequently appending data, inserting, deleting data. But the efficiency of random fetch is low.
The set is suitable for regular random storage, insertion, and deletion. But the efficiency is lower in the times.