Collection related classes have a large heap, generally only use the usual methods and additions and deletions, and it's their method name is basically the same, so always do not know when to use what set,
Today, while you are free to organize information from the Internet to facilitate future memories.
A, List:, sequentially stored in a linear manner, can hold duplicate objects
Thread-Safe methods: List List = Collections.synchronizedlist (new LinkedList (...));
LinkedList: Two-way linked list for storing index data slow insertion several faster threads are unsafe (better than security)
ArrayList: Array way to store data index data fast insert data slow thread insecure
Vector: Array way to store data index data fast insert data slow thread safety
Stack: Inherits from Vector, implements a last-in-first-out stack
Second, Set: no order, no duplicate elements
HashSet: Set for quick find design. The object that is deposited into the hashset must define HASHCODE ().
TreeSet: The set of the save order, the underlying tree structure. Use it to extract ordered sequences from the set.
Linkedhashset: has hashset query speed, and internally uses the chain list to maintain the order of elements (the Order of insertions). The result is displayed in the order in which the elements are inserted when iterating through the set using Iterators.
Third, Map: The key must be unique
Synchronization method: Map m = collections.synchronizedmap (new TreeMap (...));
Hashtable: Hash List-based implementation allows NULL key null-value thread safety
HASHMAP: Hash List-based implementation allows NULL-key null-value thread insecure (basically consistent with Hashtable)
TREEMAP: implementation based on red and black tree data structure does not allow null key NULL thread unsafe
Weakhashmap: Improved HashMap, which implements a "weak reference" to key, which can be recycled by GC if a key is no longer referenced externally.
Use Hashset,hashmap in addition to treeset,treemap when sorting is required, because they are more efficient.
Iv. Sparsearray<e>: Two-point method for storing data (a collection class for Android)
The Android system suggests we use sparsearray<e> instead of Hashmap<integer, e>
Sparsearray the use of basic and list, in some not detailed explanation, we can see http://blog.csdn.net/xyz_fly/article/details/793194
Features of the Java collection (list, set, map)