Java Collection Class (i)
1.Java Collection Class
Java collection classes can be broadly divided into: set, List, Map three systems.
Set: Represents an unordered, non-repeatable collection.
List: Ordered, repetitive.
Map: A collection that has a mapping relationship.
1.5 New Plus:
Queue: A collection of queues implementation.
The collection classes are located under the Java.util package (for saving indeterminate data and saving associative arrays).
The collection class holds the object (a reference to the object).
Java Collection classes:
Are derived from the two interface: Collection and Map.
Inheritance tree of collection collection system
Map System Inheritance Tree
Map saves data: Key-value, which is composed of Key and value.
Example: Language-79, math-80, which is composed of subjects and grades.
Key: cannot be repeated such as: The account is not repeatable, the score can be the same
Retrieve the value data according to key, such as: Check the score according to the subject.
Diagram: Set, List, Map.
Access:
Set: Accessible only through elements.
List: Accessed through the index.
Map: Gets value by key.
For Set, List, Map the most common implementation class: HashSet, ArrayList, HashMap.
Java collection Classes