Buy to unlock all questions, full reading mode and PDFs.
About this question bank
Questions
196 in total
Free to try
20 questions (no sign-up)
Exam domains
6 domains
Price
JPY 1,500 (≈ US$10; shown in your local currency at checkout) · one-time payment · 3 months
PDF
Japanese–English · Chinese–English · Korean–English · English (for buyers)
Data version
2026-12
About this exam
Oracle's professional-level exam for Java SE 8: for the English exam, holders of the Oracle Certified Associate, Java SE 8 Programmer credential who passed it earned Oracle Certified Professional, Java SE 8 Programmer; for the Japanese exam (1Z0-809-JPN), holders of Oracle Certified Java Programmer, Silver SE 8 who passed it earned Oracle Certified Java Programmer, Gold SE 8. The Japanese-language version (1Z0-809-JPN) was withdrawn on July 16, 2025 and the English version on November 30, 2026. It covered class design, generics and collections, lambdas and the Stream API, exceptions, the Date/Time API, NIO.2, concurrency, and JDBC.
Try a sample question
This is an original sample question written by itmoshi based on the exam objectives.
What is the output when the program in the exhibit is compiled and run on OpenJDK 8?
Exhibit
import java.util.stream.Stream;
public class Lazy {
public static void main(String[] args) {
Stream<String> s = Stream.of("a", "bb", "ccc")
.peek(x -> System.out.print(x + " "))
.filter(x -> x.length() > 1);
System.out.print("start ");
System.out.println(s.findFirst().get());
}
}
Aa bb ccc start bb
Bstart a bb bb
Cstart a bb ccc bb
Dstart bb
Show answer and explanation
Answer:B The output is start a bb bb.
Why it is correct
peek and filter are intermediate operations: the calls only build the pipeline, so no elements are processed when it is assigned to s, and "start " is printed first. Elements flow only when the terminal operation findFirst is called, one at a time. "a" is printed by peek and then dropped by filter; "bb" is printed by peek and passes filter. findFirst is short-circuiting, and the OpenJDK 8 implementation stops as soon as it has a match, so the pipeline never processes "ccc"; finally the result bb is printed.
The other options
✗ A This assumes intermediate operations run on all elements immediately. They are lazy, so peek prints nothing before the terminal operation starts.
✗ C This assumes every element passes through peek before findFirst returns. findFirst short-circuits; in the OpenJDK 8 implementation of this pipeline, once a matching element is found the rest are not processed.
✗ D This assumes the peek action never runs. In fact, as findFirst pulls elements, peek prints "a" and "bb", and then println prints the selected bb again.
Key takeaway
Intermediate calls only build the pipeline; elements are processed when the terminal operation (findFirst here) starts traversal (lazy evaluation). On OpenJDK 8, in a sequential peek → filter → findFirst pipeline like this one, elements flow through one at a time and findFirst stops once a match is found (stateful operations such as sorted, or parallel streams, behave differently).