Spring Data Jpa Quwey returning a single result will be stored in a domain object, but if the query is returning multiple results then we need to use java Collections. Spring Data Jpa supports below standard java collection classes.
Iterable
List
Set
Streamable
- a custom extension ofIterable