Summary of Java Collections

Source: Internet
Author: User

First, the collection

(1) Assembly interface

Collection

-list

-queue

-set

Map

(2) Collections Tool class

Second, List

(1) ArrayList default capacity is 10, 1.5 times times growth, thread unsafe

(2) LinkedList bidirectional linked list implementation, thread insecure

(3) Copyandwritearraylist thread safety, through the replication of data to achieve final synchronization, can not ensure simultaneous synchronization, high-performance read, write performance is low

(4) Vector default capacity is 10, twice times growth, thread safety, low performance, add synchronized on all methods

(5) Stack thread safe, inherit vector

Second, Queue

(1) LinkedList bidirectional linked list implementation, thread insecure

(2) Priorityqueue priority queue, default return minimum value, use small top heap sort, can set comparator comparator

(3) Priorityblockingqueue thread safety

(2) Arrayblockingqueue thread-safe blocking queue

(3) Linkedblockingqueue linked list, thread-safe blocking queue

(4) Synchronousblockingqueue thread-safe, no-capacity blocking queue

(5) Concurrentlinkedqueue

(6) Concurrentlinkeddeque

Third, Set

(1) HashSet

(2) Linkedhashset

(3) TreeSet

(4) Enumset

(5) Copyonwritearrayset

(6) Concurrentskiplistset

Iv. Map

(1) HashMap

(2) Linkedhashmap

(3) Weakhashmap

(4) Concurrenthashmap

(5) Concurrentskiplistmap

(6) Hashtable

(7) Enummap

(8) TreeMap

(9) Properties

Summary of Java Collections

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.