Map<k,v> is a key-value pair, K-the type of the key that this map maintains, and the type of V-map value. The key value is one by one corresponding to the relationship;
Collection is only the key, and the underlying is also a key-value pair, but the type of the value is hidden.
Collection
The list can be placed in duplicate elements, set inside can not put repeating elements.
1, ArrayList bottom is implemented by the array, LinkedList is implemented by the list, the base of the vector is also implemented with an array.
2, HashSet bottom is the hashing algorithm implementation, TreeSet bottom is to use the binary tree implementation, Linkedhashset bottom is to use linked list to achieve.
Map
1, HashMap Bottom is the hash algorithm implementation, TREEMAP is implemented with a binary tree, Hashtable bottom is the hash algorithm, linkedhashmap the bottom is a linked list to achieve.
Vector, Hashtable is thread-safe;
ArrayList, LinkedList, HashSet, TreeSet, HashMap, TreeMap, and Linkedhashmap are thread insecure.
Java Collection Collection&map