OCP Java SE 21 Developer Study Guide
Exam: 1Z0-830 โ Oracle Certified Professional Java SE 21 Developer
Based on: OCP Oracle Certified Professional Java SE 21 Developer Study Guide by Jeanne Boyarsky & Scott Selikoff (2024)
How to Use This Guideโ
This guide is structured for two types of learners:
| ๐ฆ New Learner | ๐ฃ Senior Deep Dive |
|---|---|
| Clear explanations with analogies | JVM internals, edge cases, traps |
| Step-by-step code walkthroughs | Advanced patterns and performance |
| Exam focus with mnemonic tips | Why things work the way they do |
Each chapter page is split into these two sections so you can read at your level.
Study resourcesโ
- Chapter deep dives โ Use the numbered chapters below for explanations, Exam Quick Reference tables, and chapter-specific traps.
- Exam Tips & Quick Reference โ Use this page for a single cram sheet: mnemonics, cross-chapter traps, stream/collections matrices, and a last-minute checklist before exam day.
Exam Blueprint (1Z0-830)โ
| Domain | Topics | Chapters |
|---|---|---|
| Handling Date, Time, Text, Numeric & Boolean Values | Primitives, Wrappers, Math API, Strings, Date-Time API | 1, 2, 4 |
| Controlling Program Flow | if/else, switch, loops, break/continue | 3 |
| Using Object-Oriented Concepts | Classes, records, inheritance, polymorphism, interfaces, enums | 1, 5, 6, 7 |
| Handling Exceptions | try/catch/finally, try-with-resources, multi-catch | 11 |
| Working with Arrays and Collections | Arrays, List, Set, Map, Deque | 4, 9 |
| Working with Streams & Lambdas | Functional interfaces, streams, collectors | 8, 10 |
| Packaging and Deploying Java Code | Modules, jars, jlink, jpackage | 12 |
| Managing Concurrent Code Execution | Threads, executors, concurrent APIs, parallel streams | 13 |
| Using Java I/O API | I/O streams, NIO.2, serialization | 14 |
| Implementing Localization | Locales, resource bundles, formatting | 11 |
14 Chapters at a Glanceโ
- Chapter 1 โ Building Blocks โ JDK setup, classes, primitives, var โ Exam focus: defaults,
var, literals, text blocks, GC eligibility - Chapter 2 โ Operators โ Arithmetic, logical, bitwise operators โ Exam focus: pre/post increment, compound assignment casts,
String+ordering - Chapter 3 โ Making Decisions โ if/else, switch expressions, loops โ Exam focus: exhaustiveness,
yield, pattern/when, labeled break/continue - Chapter 4 โ Core APIs โ String, StringBuilder, arrays, Date-Time โ Exam focus: immutability,
PeriodvsDuration, zones, array/binary search rules - Chapter 5 โ Methods โ Method design, access modifiers, overloading โ Exam focus: overload resolution, varargs,
static/instance access rules - Chapter 6 โ Class Design โ Inheritance, abstract classes, polymorphism โ Exam focus: override vs hide, covariant returns,
equals/hashCode - Chapter 7 โ Beyond Classes โ Interfaces, enums, records, sealed classes โ Exam focus: records, sealed exhaustive switch,
instanceofpatterns, enums - Chapter 8 โ Lambdas & Functional Interfaces โ Lambdas, method references, built-in FIs โ Exam focus: SAM rules, capture,
andThen/compose, method ref forms - Chapter 9 โ Collections & Generics โ List, Set, Map, Deque, generics, Comparable โ Exam focus:
SequencedCollection, wildcards,nullrules per implementation, factories - Chapter 10 โ Streams โ Stream pipelines, Optional, collectors โ Exam focus: lazy/single-use, short-circuit terminals, empty-stream match behavior, collectors
- Chapter 11 โ Exceptions & Localization โ Exception hierarchy, formatting, resource bundles โ Exam focus: try-with-resources order, suppressed exceptions,
ResourceBundlechain - Chapter 12 โ Modules โ JPMS, module-info, services, jlink โ Exam focus:
exportsvsopens, transitive requires, automatic/unnamed modules, services - Chapter 13 โ Concurrency โ Threads, executors, atomic, locks, virtual threads โ Exam focus:
startvsrun, virtual threads & pinning,ConcurrentHashMap, atomics vsvolatile - Chapter 14 โ I/O โ File I/O, NIO.2, serialization, streams โ Exam focus:
Pathvs I/O, closing stream APIs, serialization contracts
Quick Tips for Exam Dayโ
Exam Strategy
- The exam has 50 questions and you have 90 minutes.
- Expect lots of "What is the output?" style questions โ practice tracing code mentally.
- Watch for trick questions: uninitialized variables, unreachable code, missing
breakin switch. - Java 21 features heavily tested: records, sealed classes, pattern matching, virtual threads, switch expressions.
Common Traps
Stringis immutable โ methods return a new object, the original doesn't change.==compares references for objects, not values. Use.equals().- Checked exceptions must be handled or declared. Unchecked ones don't.
- Module system:
exportsโopens. Know the difference.
Good luck with your studies! ๐ฏ Start with Chapter 1 โ