collection in Java

Java Collections refer to a collection of individual objects. You can perform operations such as searching, sorting, insertion, manipulation, deletion, etc., on Java Collections.
A Java Collection framework includes,
* Interfaces: Interface allows Java Collections to be manipulated independently from the details of their representation.
* Classes: Classes are the implementation of the Collection interface.
* Algorithm: Algorithm refers to the methods that are used to perform operations such as searching and sorting, on objects that implement Collection interfaces. 

The Collection interface (java.util.Collection) and Map interface (java.util.Map) are the two main “root” interfaces of Java collection classes. Notice that Map doesn’t implement the Collection interface. It is considered part of the Java Collections Framework, even though it isn’t technically a Collection. It is a collection (note the lower-case), though, in that it contains a group of objects. The reason why maps are treated differently is that they need different methods due to being key/value pairs.
Collection cannot contain primitive. We cannot use primitive for collections type.