/** * Collection * List (Access ordered, indexed, can be repeated) * ArrayList * The underlying is an array implementation, thread unsafe, find and modify Fast, increment and delete slow * linkedlist * Bottom is linked list implementation, thread insecure, increase and delete faster, find and modify slower * Vector * The bottom is the implementation of the array, thread-safe, whether add or delete changes are slow * if you find and modify more, with ArrayList * If you increase and delete more, with LinkedList * If you have more, use ArrayList * Set (Access unordered, no index, can not be repeated) * HashSet * Bottom is the hash algorithm implementation * Linkedhashset * The underlying is a linked list implementation, but also can guarantee the element unique, and the same as HashSet principle * TreeSet * The bottom is a two-fork tree algorithm implementation * Generally in the development of the time do not need to order the stored elements, so in the development of most use hashset,hashset efficiency is higher * Tre ESET in the interview time more, ask you have several sorts of ways, and several sort of difference * Map * HashMap * Bottom is hash algorithm, for key * LINKEDH Ashmap * Bottom is linked list, for key * TreeMap * Bottom is two fork tree algorithm, for key * development with more than HashMap*/
Summary of Java Collections