ArrayList, Vector, LinkedList storage properties and characteristics

ArrayList and Vector data is stored using an array, the array element number is greater than the actual data is stored so as to increase and insert elements, which allow the element directly indexed by serial number, but to insert the element array elements involved in memory operations like move, so the index data fast and slow data insertion.

Vector the use of a synchronized method (thread-safe), typically on the performance than ArrayList difference, and LinkedList bidirectional linked list implementation stored, indexed by serial number data needs to forward or to traverse, but only before and after recording according to the present item inserts data keys to, the insertion faster.

Guess you like

Origin www.cnblogs.com/weigy/p/12573965.html