Collection concept of the collection: (Factor group length is fixed dead, use inconvenient so introduce set)
In Java programming, things that are used to load other kinds of objects (reference types) are called containers.
Arrays are containers, and collections are containers, and containers have collection--interfaces in Java.
Collection is the most basic set interface, and a collection represents a set of object, the collection element (Elements). Java The SDK does not provide classes that inherit directly from collection, and theJava SDK provides classes that are "subinterfaces" such as list and set that inherit from collection.
All classes that implement the collection interface must provide two standard constructors: a parameterless constructor is used to create an empty collection, and a constructor with a collection parameter is used to create a new collection. This new collection has the same elements as the incoming collection. The latter constructor allows the user to copy a collection.
Collection interface:
There are also three interfaces under the interface: Set, list, and map
Nothing in the SAT interface is ordered, one is saved and one cannot be repeated.
The contents of the list interface are ordered, one to save and one to repeat.
A map is a key-value pair that is saved in two. A key, one as a value, can be used to find one of his values.
There are two classes of implementations for each:
The set interface has HashSet and TreeSet implementation classes.
The list interface has ArrayList and LinkedList implementation classes.
The map interface has HASHMAP and TREEMAP implementation classes.
A collection base for Java