Explain the difference between Collection API and Stream API in Java8?
|S.no||Collection API||Stream API|
|1.||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|
|2.||A finite number of elements can be stored in a data structure||An infinite number of features can be stored|
|3.||Consumption of elements is multiple times||Consumption of elements is only once.|
Suggest An Answer
No suggestions avaliable!