1. The Java Collection Framework provides a set of well-performing, easy-to-use interfaces and classes that are located in the Java.util package
Attention:
- There are both interfaces and classes, the picture of the solid line is the class, the dotted line is the interface
- Need to import Java.util package before use
- List and set are sub-interfaces of collection, ArrayList and LinkedList are two implementation classes of list, HashSet and TreeSet are two implementation classes of set
- Highlights: ArrayList, LinkedList and HashSet
- A collection of map interfaces is a storage mechanism that stores data in the form of K-V key-value pairs, different from collection values
- Iterator: After putting the data in the collection, it is generally done by looping through the data in the collection, Iterator is an iterator, and the iteration means that one is taken out, where he is the data used for an iterative collection or map.
- Collections and arrays in utilities are some of the tool classes that manipulate collections, which provide some methods for manipulating collections, such as arrays in previous arrays, sorting arrays, and so on.
The 2.Collection interface stores a set of non-unique, unordered objects
the 2.1List interface stores a set of objects that are not unique, ordered (in order of insertion)
1
|
0 | TD valign= "Top" width= "102" >
2 |
3 |
4 |
5 |
|
Aaaa |
bbbb |
Cccc |
dddd |
dddd |
Fffff |
The 2.2Set interface stores a unique, unordered set of objects
The 2.3Map interface stores a set of key-valued objects that provide a key-to-value mapping
Initial knowledge of the Java Collection Framework (Iterator, Collection, Map)