0 votes
in JAVA by
What distinguishes a collection from a stream?

1 Answer

0 votes
by

A Package includes its elements, whereas a Stream does not, and this is the primary distinction between the two types of data structures. Unlike other views, Stream operates on a view whose elements are actually kept in a collection or array, but any changes made to Stream do not affect the original collection.

Related questions

0 votes
asked Apr 15, 2021 in JAVA by SakshiSharma
0 votes
asked May 31, 2022 in JAVA by Robin
...