Collection-List/ArrayList/LinkedList/Vector

来源:互联网 发布:电脑整蛊软件 编辑:程序博客网 时间:2024/05/12 00:57

List is an ordered collection. The user of this interface has precise control over where in the list each element is inserted.. The user can access the element by their integer index, and search for elements in the list. Also, unlike sets, list typically allows duplicated elements.

Array List is re sizable-array implementation of the List interface. Implements all optional list operations, and permits all elements, including null. In addition to implementing the list interface, this class can provides methods to manipulate the size of the array that is used internally to store the list. (This class is roughly equivalent to Vector, except that it is synchronized).

Note that this implementation is not synchronized. If multiple threads access an Array List instance concurrently, and at least one of the threads modifies the list structurally. It must be synchronized externally.


Linked List is a doubly-linked list implementation of List and Deque interface. Implements all optional list operations, and permit all elements,including nulls.

Note that this implementation is not synchronized. If multiple threads access an Array List instance concurrently, and at least one of the threads modifies the list structurally. It must be synchronized externally.


Vector is just like Array List, except that Vector is thread safe.


0 0
原创粉丝点击