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