The Java container can be divided into two types:
1, Collection: A sequence of independent elements that have one or more rules. The list saves the elements in the order in which they are inserted, the set cannot have duplicate elements, and the queue determines the order in which the objects are produced (usually in the order of insertion) according to the queuing rules. If they subdivide, there are:
1.1, ArrayList: Insert the order and save the same order, if the data inserted in the tail, performance OK, the data inserted in other parts of the poor
1.2, LinkedList: Insert the order and save the same order, chain data, insert data performance good
1.3, HashSet: Provide fast search technology, but there is no obvious order to save the element
1.4, TreeSet: results in ascending order to save the key
1.5, Linkhashset: According to the insertion of the Save key, while the speed of the query HashMap some of the spell,
2, Map: To save objects with key values, allowing you to use the built to find values, if they subdivide, there are:
2.1, HashMap: Provide fast search technology, but there is no obvious order to save the element
2.2, TreeMap: results in ascending order to save the key
2.3, Linkedhashmap: According to the insertion of the Save key, while the speed of the query HashMap some of the spell,
Java Container Record