Question: Which fills in the blank so the code is guaranteed to print 1? var stream = Stream.of(1, 2, 3); System.out.println(stream.__________); A. anyMatch() B. findAny() C.

Which fills in the blank so the code is guaranteed to print 1?
var stream = Stream.of(1, 2, 3);
System.out.println(stream.__________);

A. anyMatch()

B. findAny()

C. first()

D. min()

E. None of the above  

Step by Step Solution

3.54 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The correct answer is B findAny Here is an explanation why The findAny operation can be used when yo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!