Collections in java is a framework that provides an architecture to store and manipulate the group of objects.
All the operations that you perform on a data such as searching, sorting, insertion, manipulation, deletion etc. can be performed by Java Collections.
Java Collection simply means a single unit of objects. Java Collection framework provides many interfaces (Set, List, Queue, Deque etc.) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet etc).
Collection represents a single unit of objects i.e. a group.
Collection framework represents a unified architecture for storing and manipulating group of objects. It has:
is used to insert an element in this collection.
is used to insert the specified collection elements in the invoking collection.
is used to delete an element from this collection.
is used to delete all the elements of specified collection from the invoking collection.
is used to delete all the elements of invoking collection except the specified collection.
return the total number of elements in the collection.
removes the total no of element from the collection.
is used to search an element.
is used to search the specified collection in this collection.
returns an iterator.
It returns true if iterator has more elements.
It returns the element and moves the cursor pointer to the next element.
It removes the last elements returned by the iterator. It is rarely used.