Java Collection Framework Overview Java Collection Concepts
Java Collection class: A tool class, like a container, that stores any number of objects with common attributes.
The role of the Java collection
1. Within the class, the data is organized;
2. Simple and fast search for large numbers of entries;
3. Some collection interfaces, which provide a series of orderly elements, and can quickly insert or delete the relevant elements in the sequence;
4. Some collection interfaces, which provide a mapping relationship, can be used to quickly find the corresponding unique object through the keyword (key), which can be any type.
Array and Collection comparisons
1. Fixed length of array, variable length of Set
2. Arrays can only access elements by subscript, types are fixed, and some collections may find specific objects that are mapped by any type.
Java Collection Framework Architecture
The Java collection consists of two major families, collection and map;
Collection//Three sub-interfaces store individual objects
--1.list;//ordered, repeatable; more commonly known as sequences
1.1 list-->ArrayList //array sequence
2.Queue; Arranged in an orderly, repeatable manner; Also known as queues
2.1 queue-->linkedlist (linkedlist<--list)/Chain list
3.Set//unordered, non-repeatable; more commonly used; also known as set
3.1 set-->HashSet //hash Set
Map (<key,value> entry Class)//key value pair key and value can be of any type
-HashMap
------above are more commonly used------
Reference Material: MU-class network http://www.imooc.com/video/2415
Java Collection Framework (i)