Java Collection Framework Detailed

Source: Internet
Author: User

Collection Frame
Collection
|--list sets, elements are ordered (in the order in which they are deposited and taken out), and can have duplicate elements because the set system is indexed.
|--arraylist collection, the underlying data is the structure of the array, features: Fast query, adding and deleting slow. Threads are out of sync.
|--linkedlist collection, the underlying data is linked list structure, features: Delete quickly, query slow. Thread is out of sync
|--vector collection, the underlying data is the array structure. The threads are synchronized. has been replaced by the ArrayList collection.

|--set sets, elements are unordered (in the order in which they are deposited and taken out), and cannot have duplicate elements.
|--hashset collection, the underlying data is the hash table structure.
The uniqueness of the HashSet collection element is determined by the hashcode () and Equals () methods, and if the hash value of the element is different, whether equals is true.
The |--treeset collection allows you to sort the elements in the set set in a certain order.

This article from "Sima" blog, reproduced please contact the author!

Java Collection Framework Detailed

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.