Skip to main content

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 analogiesJVM internals, edge cases, traps
Step-by-step code walkthroughsAdvanced patterns and performance
Exam focus with mnemonic tipsWhy 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)โ€‹

DomainTopicsChapters
Handling Date, Time, Text, Numeric & Boolean ValuesPrimitives, Wrappers, Math API, Strings, Date-Time API1, 2, 4
Controlling Program Flowif/else, switch, loops, break/continue3
Using Object-Oriented ConceptsClasses, records, inheritance, polymorphism, interfaces, enums1, 5, 6, 7
Handling Exceptionstry/catch/finally, try-with-resources, multi-catch11
Working with Arrays and CollectionsArrays, List, Set, Map, Deque4, 9
Working with Streams & LambdasFunctional interfaces, streams, collectors8, 10
Packaging and Deploying Java CodeModules, jars, jlink, jpackage12
Managing Concurrent Code ExecutionThreads, executors, concurrent APIs, parallel streams13
Using Java I/O APII/O streams, NIO.2, serialization14
Implementing LocalizationLocales, resource bundles, formatting11

14 Chapters at a Glanceโ€‹

  1. Chapter 1 โ€” Building Blocks โ€” JDK setup, classes, primitives, var โ€” Exam focus: defaults, var, literals, text blocks, GC eligibility
  2. Chapter 2 โ€” Operators โ€” Arithmetic, logical, bitwise operators โ€” Exam focus: pre/post increment, compound assignment casts, String + ordering
  3. Chapter 3 โ€” Making Decisions โ€” if/else, switch expressions, loops โ€” Exam focus: exhaustiveness, yield, pattern/when, labeled break/continue
  4. Chapter 4 โ€” Core APIs โ€” String, StringBuilder, arrays, Date-Time โ€” Exam focus: immutability, Period vs Duration, zones, array/binary search rules
  5. Chapter 5 โ€” Methods โ€” Method design, access modifiers, overloading โ€” Exam focus: overload resolution, varargs, static/instance access rules
  6. Chapter 6 โ€” Class Design โ€” Inheritance, abstract classes, polymorphism โ€” Exam focus: override vs hide, covariant returns, equals/hashCode
  7. Chapter 7 โ€” Beyond Classes โ€” Interfaces, enums, records, sealed classes โ€” Exam focus: records, sealed exhaustive switch, instanceof patterns, enums
  8. Chapter 8 โ€” Lambdas & Functional Interfaces โ€” Lambdas, method references, built-in FIs โ€” Exam focus: SAM rules, capture, andThen/compose, method ref forms
  9. Chapter 9 โ€” Collections & Generics โ€” List, Set, Map, Deque, generics, Comparable โ€” Exam focus: SequencedCollection, wildcards, null rules per implementation, factories
  10. Chapter 10 โ€” Streams โ€” Stream pipelines, Optional, collectors โ€” Exam focus: lazy/single-use, short-circuit terminals, empty-stream match behavior, collectors
  11. Chapter 11 โ€” Exceptions & Localization โ€” Exception hierarchy, formatting, resource bundles โ€” Exam focus: try-with-resources order, suppressed exceptions, ResourceBundle chain
  12. Chapter 12 โ€” Modules โ€” JPMS, module-info, services, jlink โ€” Exam focus: exports vs opens, transitive requires, automatic/unnamed modules, services
  13. Chapter 13 โ€” Concurrency โ€” Threads, executors, atomic, locks, virtual threads โ€” Exam focus: start vs run, virtual threads & pinning, ConcurrentHashMap, atomics vs volatile
  14. Chapter 14 โ€” I/O โ€” File I/O, NIO.2, serialization, streams โ€” Exam focus: Path vs 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 break in switch.
  • Java 21 features heavily tested: records, sealed classes, pattern matching, virtual threads, switch expressions.
Common Traps
  • String is 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 โ†’