I'm learning about Streams in Java 8. I got confused about this concept:
A collection is an in-memory data structure, which holds all the values that the data structure currently has—every element in the collection has to be computed before it can be added to the collection. In contrast, a stream is a conceptually fixed data structure in which elements are computed on demand.
I don't understand, how can a Collection only hold values that must have been computed before they can be added to the collection? And also, what is meant by the comparison of a Stream with a fixed data structure?