Set collections, List collection, a collection of distinguished Map

1.Set collection
Set collection is inheriting an interface Collection, and its data are unordered, unrepeatable. It mainly includes three types of data stored variables are HashSet, LinkedHashSet, TreeSet. It is suitable for delete, insert data, not suitable for retrieving data.

2.List collections
List also inherited a collection of sub-Collection interface, except that the data inside it is ordered repeatable. It is similar to the array, so it is suitable to retrieve data, not suitable for insert, delete data.

3.Map set
does not inherit directly Collection set, double chain which is a collection of interfaces, data in the form of key-value store. Key is not repeated, the value may be repeated. When the key input is repeated, its value will be overwritten. It is suitable to store key data exist.

Released seven original articles · won praise 6 · views 452

Guess you like

Origin blog.csdn.net/qq_44454898/article/details/93729105