Collection Interface Collection Interface
1. In the collections system, the interface Collection is the root interface
2. Refers to a set of objects that are called Collection elements.
3. There are some Collection that allow repeating elements, such as List. Others are not allowed, such as Set
4. Some elements of implementation are ordered, others are unordered.
5. Two "standard" constructors available
A. Non-parametric constructors
B. A constructor with only one argument, the parameter type is Collection
6. When a self-referential condition exists, the method involving recursive traversal fails, including clone (), Equals (), Hashcode (), and toString (). The implementation class can choose whether to handle self-referencing situations. Most of the current implementation classes do not handle self-referential situations.
7. ToArray (), allocate a new memory for storing the returned array of objects. In this way, the caller is free to modify the returned array elements without affecting the original collection elements.
[Java] Collections-Source Code learning notes