0 votes
in JAVA by
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

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