Java Guide
Java 8 Streams Study 8 Streams
Questions & Answers Programming Exam Review 2026–2027
Study this set o nline at: https://www.cram.co m/flashcards/java-8-streams-10370137
Stream<Stri ng> s = Stream.empty();What i s the count? 0
I n 2 of the reduce() methods, the i denti ty i s ______ that I 'l l be merged usi ng the
i ni ti al val ue, accumul ator
____
System.out.pri ntl n(stream.____ ); col l ects the stream i nto a l i st bef ore pri nti ng i t. col l ect(Col l ectors.toLi st())
What termi nal operati on can be appended to peek(System. out::pri ntl n)_____ to
count();
pri nt?
1
, Java Guide
Java 8 Streams Study 8 Streams
Questions & Answers Programming Exam Review 2026–2027
Study this set o nline at: https://www.cram.co m/flashcards/java-8-streams-10370137
____ i s the most common way to pri nt a stream but i t i s ____ to a stream and i t
stream.f orE ach(System.out::pri ntl n);destructi ve does not work
____ f or i nf i ni te streams.
Whi ch i s the onl y pri nt method that i s not destructi ve to the Stream? stream.peek(System.out:: pri ntl n).count();
Whi ch i s the onl y pri nt method that works f or i nf i ni te streams? stream.l i mi t(val ).f orE ach(System.out::pri ntl n);
Whi ch two termi nal operati ons take a comparator as parameters? max() and mi n()
2
Java 8 Streams Study 8 Streams
Questions & Answers Programming Exam Review 2026–2027
Study this set o nline at: https://www.cram.co m/flashcards/java-8-streams-10370137
Stream<Stri ng> s = Stream.empty();What i s the count? 0
I n 2 of the reduce() methods, the i denti ty i s ______ that I 'l l be merged usi ng the
i ni ti al val ue, accumul ator
____
System.out.pri ntl n(stream.____ ); col l ects the stream i nto a l i st bef ore pri nti ng i t. col l ect(Col l ectors.toLi st())
What termi nal operati on can be appended to peek(System. out::pri ntl n)_____ to
count();
pri nt?
1
, Java Guide
Java 8 Streams Study 8 Streams
Questions & Answers Programming Exam Review 2026–2027
Study this set o nline at: https://www.cram.co m/flashcards/java-8-streams-10370137
____ i s the most common way to pri nt a stream but i t i s ____ to a stream and i t
stream.f orE ach(System.out::pri ntl n);destructi ve does not work
____ f or i nf i ni te streams.
Whi ch i s the onl y pri nt method that i s not destructi ve to the Stream? stream.peek(System.out:: pri ntl n).count();
Whi ch i s the onl y pri nt method that works f or i nf i ni te streams? stream.l i mi t(val ).f orE ach(System.out::pri ntl n);
Whi ch two termi nal operati ons take a comparator as parameters? max() and mi n()
2