A Collection is a java framework that groups multiple objects into a single unit. It is used to store, retrieve and manipulate the aggregate data.
In JPA, we can persist the object of wrapper classes and String using collections. JPA allows three kinds of objects to store in mapping collections - Basic Types, Entities and Embeddable.
Collection Types
On the basis of requirement, we can use different type of collections to persist the objects.
- List
- Set
- Map
The java.util package contains all the classes and interfaces of collection framework.