↓ Try a sample question (with explanation)

Oracle · Practice questions

1Z0-809 Java SE 8 Programmer II

Study 196 1Z0-809 Java SE 8 Programmer II practice questions with explanations. 20 of them are free to try, no sign-up needed.

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());
    }
}
  1. Aa bb ccc start bb
  2. Bstart a bb bb
  3. Cstart a bb ccc bb
  4. 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).

Try 20 questions like this for free

Most frequent topics

  1. Using stream operations31 questions
  2. Using lambda expressions and method references31 questions
  3. Implementing inheritance and polymorphism26 questions
  4. Implementing encapsulation and access modifiers20 questions
  5. Using the Path interface and file operations18 questions
  6. Using Statement and ResultSet12 questions

Number of questions per topic among the 196 in this bank (top topics), as classified by itmoshi.

Exam domains

  1. Java Class Design50 questions
  2. Lambda Expressions and Stream API75 questions
  3. Concurrency14 questions
  4. NIO.2 and I/O27 questions
  5. JDBC20 questions
  6. Date/Time API10 questions

Other Oracle exams

← All exams

itmoshi is an unofficial study service and is not affiliated with Oracle or any exam provider.