in JAVA by
Q:
What do you mean by saying Stream is lazy?

1 Answer

0 votes
by
When we say Stream is lazy, we mean that most of the methods defined on Java .util.stream.Stream class is lazy i.e. they will not work by just including them on Stream pipeline.

They only work when you call a terminal method on the Stream and finish as soon as they find the data they are looking for rather than scanning through the whole set of data.

Related questions

0 votes
asked Apr 15 in JAVA by SakshiSharma
0 votes
asked Apr 8 in JAVA by SakshiSharma
...