Working with Streams and Lambda expressions

9 practice questions under this official exam objective (1Z0-829), each with the answer key, an option-by-option explanation and instant feedback.

Questions under this objective

9 total · page 1 of 1
1Z0-829 S-grade

Java Stream reduce with Identity and Combiner

This question tests the behavior of the parallelStream reduce method when using an identity, accumulator, and combiner. The correct output is determin

9 comments
1Z0-819 S-grade

Valid BiPredicate Lambda Parameter Syntax

This question tests the strict syntax rules for lambda parameters in Java, specifically regarding type inference with 'var' and the 'final' modifier.

5 comments
1Z0-829 A-grade

Java Stream Match and FindFirst Results

This page analyzes the output of Java Stream methods allMatch, anyMatch, noneMatch, and findFirst on a list of strings. It establishes that the correc

5 comments
1Z0-829 S-grade

Java Stream reduce with Identity vs Accumulator

This question tests the behavior of the three-argument reduce method in Java Streams. It establishes that providing an identity value to a parallel st

5 comments
1Z0-819 S-grade

What Happens When You Sort a List Created with List.of()?

This 1Z0-819 fragment builds a flower list with List.of() and then attempts to sort it with a Comparator, so the exam tests whether you recognize that

4 comments
1Z0-829 A-grade

Enum Switch Result with Unused Stream dropWhile

This question tests the interaction between an unused Stream dropWhile operation and a switch expression on an enum. The page establishes that the int

4 comments
1Z0-819 A-grade

Effectively Final Variable Usage in Java Lambda Expressions

This question tests the rule that local variables accessed by lambda expressions must be effectively final. The code compiles and runs correctly becau

3 comments
1Z0-819 S-grade

Which BiPredicate Lambda Declaration Using var Is Valid?

This 1Z0-819 item tests the Java lambda parameter syntax rules for var: a lambda that declares any parameter with var must use var on every parameter

3 comments
1Z0-819 A-grade

Which Stream Method Finds an Item With count Below Zero?

This 1Z0-819 question asks which Stream pipeline correctly tests whether the items list contains at least one element whose count field is below zero.

3 comments