What is the difference between collection and stream?
|Collection API is for storing the data in the different kinds of data structures.
|Stream API is not a data structure; it is used for computation of the data on the big set of objects
|A finite number of elements can be stored in a data structure
|An infinite number of features can be stored
|Consumption of elements is multiple times
|Consumption of elements is only once.
BY Best Interview Question ON 02 Feb 2020