Exam strategy
Time management, eliminating impossible answers, the "does not compile" option, and how to keep practising after the exam.
Approaching the 1Z0-829 on exam day
The OCP Java SE 17 exam has 50 questions in 90 minutes — roughly 108 seconds per question. Enough time to read carefully, not enough to second-guess yourself repeatedly.
### Time management
- First pass: answer every question you are confident on. Mark uncertain ones for review. - Second pass: return to marked questions. Eliminate and commit — do not leave questions blank (no penalty for guessing). - Target: complete the first pass in 60 minutes, leaving 30 for review.
### Eliminate impossible answers first
For "what is the output?" questions, check in this order:
- Does it compile? Scan for type mismatches, missing semicolons, inaccessible constructors, missing
throwsclauses. If it does not compile, the answer is "does not compile" and you are done. - Does it throw at runtime? Check for NPE,
ClassCastException,ArrayIndexOutOfBoundsException,StackOverflowError. - What is the output? Only after passing the first two checks.
### The "does not compile" option is real
OCP questions regularly include code that does not compile. Common causes:
- Accessing a variable before it is definitely assigned.
- Calling a non-static method or field in a static context.
- Missing throws on a method that throws a checked exception.
- Incompatible types in an assignment without a cast.
- Calling a private constructor from outside the class.
If you find a compile error, choose "does not compile" immediately.
### Read the whole code block
Exam questions are short but dense. Common traps are at the top (a variable declared differently than you assumed) or at the bottom (a return type that changes what the last expression evaluates to). Read every line before answering.
### Trust the spec
Java's behaviour on every question is specified exactly. When the output surprises you, trust the language rules over your intuition. Integer division truncates. Streams are consumed once. java.time is immutable. These are not bugs — they are specified behaviour.
### Keeping sharp after the exam
Passing the exam is a starting line, not a finish line:
- Build something small — a command-line tool, a REST service. Real bugs teach faster than any drill. - Write tests first — TDD forces you to think about contracts before implementations. - Read production code — open-source Java projects (Apache Commons, Spring, Guava) show idiomatic patterns at scale. - Review Java release notes — records, sealed classes, pattern matching, virtual threads appear in interviews even if not on the 17 exam.