(JAVA) List of LinkedList and ArrayList difference

This is described in "Thinking in Java" in:

The ArrayList basic, longer than the random access to the elements, but slow in the middle of insertion and removal of elements List.

The LinkedList, lower cost through insertion and deletion operations performed in the middle List, provide sequential access optimization. Further, the LinkedList relatively slow in terms of random access, but its feature set larger than ArrayList.

Arraylist: bottom layer is based on dynamic array, the array capacity is to change the dynamic array method, creates a new array, specify the new size (1.5 times), copying the old array to the new array, and the old array to the new class of this array 

LinkedList: doubly linked list, and queue (Queue), two-way queue (Deque) Interface

 

Content to be increased concurrency.

Guess you like

Origin blog.csdn.net/qq_24598059/article/details/92606965