|
Both ArrayList and LinkdList are implementations of the List interface. LinkdList uses a linked list data structure. ArrayList represents an array of variable size. Vector is also an implementation of the List interface. Its function is similar to ArrayList. The difference is that the Vector class implementation uses a synchronization mechanism, and ArrayList does not use a synchronization mechanism.
ArrayList allows fast random access, but when adding and removing elements in the center of the List, the efficiency is very poor.
LinkedList provides the best sequential access, which can improve the efficiency of adding and removing elements in the central position of List. LinkedList also does not use a synchronization mechanism.
HashMap is the implementation class of Map, which accesses the key according to the hash algorithm, and has good access performance. At the same time, HashMap allows null to be the key or value of the map.
I copied it from the book. |
|