Roughly divided into set,list,queue,map four kinds of system
Set represents unordered, non-repeatable collections, accessed through the element itself
The list represents an ordered, repeatable collection, accessed through an element index
Map represents a collection of mappings, accessed by key
Queue represents an implementation of a collection of queues
The collection interface is the parent interface of List,set,queue, which defines the following set of methods: Add,addall,clear,contains,containsall,isempty,iterator,remove, Removeall,retainall,insize,toarray
All classes that implement collection override the ToString method to output all elements of the collection at once
Iterable is the parent interface of the collection interface, Java provides a foreach default method for Iterable, and the parameter is a function interface (an interface that contains only one method)
Collection books = new HashSet ();
Books.add ("a"); Books.add ("B");
Books.foreach (Obj->system.out.println ("iterative element" +obj));
Java Collection Collection,map