Overview (The content of this section is best written down, ready to use, casually can speak, readily can write):
1,collection sets the top-level parent class, inheriting iterable (an iterative interface).
2, Method: Add, AddAll, clear,
First, take a look at the definition of collection
public interface collection<extends iterable<e>
From the definition, we can see that collection is an interface with a generic type.
Implements the Iterable interface, which means that iterators can be used.
The above two points are important, and all of the sub-classes below have these two properties.
Second, let's take a look at Colleciton's own approach (which does not include integration).
1, about add and AddAll.
Both add elements to the collection (the respective subclasses are implemented specifically).
The former is to add a single element, which is a collection of subclasses that can add a collection implementation.
For example:
New linkedlist<> ();
Collection.add ("Escore");
Collection.add ("Wym");
Collection.add ("Charlie");
New arraylist<> ();
List.add ("Anne");
List.add ("Tom");
Collection.removeall (list);
2, to be continued ...
Java Collection Colleciton Interface