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
The correct answer is B findAny Here is an explanation why The findAny operation can be used when yo... View full answer
Get step-by-step solutions from verified subject matter experts
