Skip to content

Learn for OCP 17, OCP 21, or OCP 25 one rule at a time, with answers run on the matching JDK.

One bank of short drills covers Java 17, 21, and 25. Each drill tests one rule, knows which exams it applies to, and was run on that exam’s JDK.

The three Java OCP exams

  • OCP 17Exam 1Z0-829 Java 17

    Java SE 17 Developer

    50 questions · 90 minutes · 68% to pass Format from secondary sources: check it on education.oracle.com before you book.

    Domains
    11
    Topics
    94
    Drills
    1,293
  • OCP 21Exam 1Z0-830 Java 21

    Java SE 21 Developer Professional

    50 questions · 120 minutes · 68% to pass Format from secondary sources: check it on education.oracle.com before you book.

    Domains
    10
    Topics
    96
    Drills
    1,391
  • OCP 25Exam 1Z0-831 Java 25

    Java SE 25 Developer

    50 questions · 120 minutes · 68% to pass

    Domains
    10
    Topics
    102
    Drills
    1,471

Learn first, then rehearse

The Java OCP syllabus is long. A study guide covers it once, in prose. A full mock exam tests it all at once: each question mixes several traps and topics, and one sitting takes about two hours. Learn here first, one rule at a time, then rehearse under exam conditions.

  1. In this app

    Learn one rule at a time

    Short daily sessions. Each drill tests one rule, shows what the JVM did, and comes back just before you'd forget it.

  2. In this app

    Check readiness by domain

    Recall per domain shows which objectives you still miss, so you study those instead of rereading everything.

  3. With full mock exams, such as Enthuware

    Rehearse under exam conditions

    Full timed mock exams: long code, mixed traps, the clock. Enthuware is built for this. The few mock exams here check your timing. They don't replace a full bank.

  • Study guide

    One sitting
    A chapter
    Rules per question
    Many, explained in prose
    When you find out you were wrong
    When you test yourself
    When it comes back
    When you reread it
    Best for
    A first complete pass over the syllabus
  • Short drills, here

    One sitting
    As long as you have: stop after any drill
    Rules per question
    One
    When you find out you were wrong
    Right after you answer, with the JVM output
    When it comes back
    Just before you'd forget it
    Best for
    Learning each rule until it sticks
  • Full mock exam

    One sitting
    50 questions in 90 to 120 minutes Format from secondary sources: check it on education.oracle.com before you book.
    Rules per question
    Several, across topics
    When you find out you were wrong
    After you submit the whole exam
    When it comes back
    On your next mock exam
    Best for
    Rehearsing the exam before you book it

Same code, another Java version, another answer

Switching exams? Drills whose outcome changes between Java 17, 21, and 25 are marked as version traps. Pick a JDK to see what it did with this one.

Main.java
enum Light { RED, AMBER, GREEN }void main() {    Light l = Light.GREEN;    String action = switch (l) {        case Light.RED -> "stop";        case AMBER, GREEN -> "go";    };    IO.println(action);}

Captured run

Run on JDK 17

Compile errorExit code 1
$ java Main.javaMain.java:5: error: an enum switch case label must be the unqualified name of an enumeration constant        case Light.RED -> "stop";                  ^error: compilation failed

Start free. Pay once it's working for you.

Prices in euros, VAT included. One pass covers every Java OCP exam: OCP 17, 21, and 25.

  • Free

    €0

    About 15% of each exam's drills, with the proof and the review schedule.

    Start free
  • Practice pass

    €24 for 120 days

    Every drill, recap and mock exam for the Java OCP exams.

    Get the practice pass
  • Course + practice

    €39 for 120 days

    The full course, lesson by lesson, plus the practice pass.

    Get the course
  • All-access

    €99 per year

    Every certification as it launches, courses and practice included.

    Get all-access

Questions

Do I still need full mock exams?

Yes. Learn the rules here first, then rehearse with Enthuware’s full timed mock exams before you book.

Does one pass cover all three exams?

Yes. The practice pass covers OCP 17, OCP 21, and OCP 25, so you can switch if your team moves to a newer Java.

Which exam should I take: OCP 17, 21 or 25?

The one that matches the Java your team runs. The syllabi differ: Java 17 still includes JDBC, and Java 25 adds module imports and compact source files. The app shows which drills apply to yours.

Are these real exam questions?

No, and we never say they are. Every drill is original, written from the public Java OCP objectives, the Java Language Specification, and the Javadoc.

Some of every exam's drills are free. No card needed.

Try it free