Complete Java OCP Syllabus 2026

Detailed Topics for Java 17 (1Z0-829) and Java 21 (1Z0-830)

📋 Table of Contents

1. Overview: What is Java OCP?

The Oracle Certified Professional: Java SE Developer (OCP) certification is Oracle's professional-level Java credential. It validates that a developer has deep, working knowledge of modern Java — including features introduced from Java 8 through the latest LTS release.

Two current OCP exams are available in 2026:

Both certifications cover Java thoroughly, but the topics differ significantly. This guide breaks down what's on each exam so you can prepare with confidence.

New to Java certification? Read our OCA vs OCP comparison guide first to understand the certification hierarchy.

2. Exam Format & Logistics

Both Java 17 and Java 21 OCP exams follow the same general format, with minor variations:

Number of Questions
50
Duration
90 min
Passing Score
~65%
Question Type
Multiple Choice
Delivery
Pearson VUE
Mode
Online / Test Center

Question Format

Questions are typically scenario-based. You'll see a code snippet (5–15 lines), and you'll need to predict the output, identify a compile error, or choose the correct way to complete a snippet. Many questions are multi-select — you must select all correct answers to get credit.

Important: Single wrong selection in a multi-select question counts as the entire question wrong. Read each option carefully.
Java SE 17 OCP (1Z0-829)

3. Java 17 OCP — Complete Syllabus

The Java 17 OCP exam covers Java language features from Java 8 through Java 17, with significant emphasis on functional programming, streams, modules, and modern language features introduced in Java 9–17.

1. Handling Date, Time, Text, Numeric, and Boolean Values

  • Use primitives, wrapper classes, and autoboxing
  • Manipulate text with String, StringBuilder, and text blocks
  • Manipulate date, time, duration, period, instant, and time-zone objects

2. Controlling Program Flow

  • Create program flow control using if/else, switch statements and expressions, loops, break, continue
  • Use pattern matching with instanceof
  • Switch expressions with arrow syntax

3. Using Java Object-Oriented Approach

  • Declare and instantiate Java objects including nested classes
  • Define and use fields and methods, constructors, instance/static initializers
  • Implement overloading, including method varargs
  • Use enumerations including switch statements with enums
  • Declare, instantiate, and use record classes
  • Implement inheritance: classes, abstract classes, final keyword
  • Implement sealed classes and interfaces
  • Implement interfaces including default methods, static methods, and private methods
  • Implement polymorphism, distinguish between compile-time and runtime type
  • Cast a value, including pattern matching with instanceof
  • Identify, understand, and use the Object class methods (equals, hashCode, toString)

4. Handling Exceptions

  • Handle exceptions using try/catch/finally, try-with-resources, and multi-catch statements
  • Distinguish between checked and unchecked exceptions
  • Throw exceptions, recognize exception classes, and create custom exceptions

5. Working with Arrays and Collections

  • Create Java arrays, List, Set, Map, and Deque collections
  • Add, remove, update, retrieve, sort, and search elements in lists, arrays, and matrices
  • Use Comparator and Comparable interfaces

6. Working with Streams and Lambda Expressions

  • Use Java object and primitive Streams, including lambda expressions implementing functional interfaces
  • Perform decomposition, concatenation, reduction, grouping, and partitioning on sequential and parallel streams
  • Use the built-in functional interfaces (Predicate, Consumer, Function, Supplier and their variants)
  • Use Optional to handle absent values

7. Packaging and Deploying Java Code and Using the Java Platform Module System (JPMS)

  • Define modules and their dependencies, expose module content, and use service loaders
  • Create runtime modules and applications
  • Document, package, and deploy Java applications

8. Managing Concurrent Code Execution

  • Use Java parallel streams
  • Create worker threads using Runnable and Callable
  • Manage thread execution with the Executors framework and thread pools
  • Develop thread-safe code using locks, synchronized blocks, and concurrent API classes
  • Process Java collections concurrently and use parallel streams

9. Using Java I/O API

  • Read and write console and file data using I/O Streams
  • Implement serialization and deserialization techniques on Java objects
  • Handle file system objects using java.nio.file API (Path, Files)

10. Accessing Databases Using JDBC

  • Create connections, perform CRUD operations, and configure properties using JDBC API

11. Implementing Localization

  • Implement localization using Locale, resource bundles, and Java APIs to parse and format messages, dates, and numbers
Java SE 21 OCP (1Z0-830)

4. Java 21 OCP — Complete Syllabus

The Java 21 OCP exam updates the syllabus to reflect Java's evolution through Java 21, including major additions like virtual threads, record patterns, and sequenced collections. JDBC is no longer included in this exam.

Major Change: JDBC is removed from the Java 21 OCP syllabus. If you're focused on database programming, the Java 17 OCP (1Z0-829) may better align with your goals.

1. Handling Date, Time, Text, Numeric, and Boolean Values

  • Use primitives, wrapper classes, autoboxing/unboxing
  • Use String, StringBuilder, and text blocks
  • Use date, time, duration, period, instant, and time-zone classes

2. Controlling Program Flow

  • Use if/else, switch statements and expressions, loops, break, continue
  • Use pattern matching with instanceof and switch (including pattern matching for switch)
  • Use record patterns (deconstruction)

3. Java Object-Oriented Approach

  • Declare and instantiate objects, classes, records, abstract classes, sealed classes, interfaces
  • Use inheritance, polymorphism, casting (including pattern-matching cast)
  • Implement constructors, methods, fields, static and instance members
  • Use enumerations including enhanced switch with enums
  • Use Object class methods (equals, hashCode, toString)
  • Use record patterns in switch and instanceof

4. Exception Handling

  • Handle exceptions using try/catch/finally, try-with-resources, multi-catch
  • Throw exceptions, including custom checked and unchecked exceptions
  • Distinguish between checked and unchecked exceptions

5. Arrays and Collections (including Sequenced Collections)

  • Create and use Java arrays, List, Set, Map, Deque, and the new SequencedCollection, SequencedSet, and SequencedMap interfaces
  • Use addFirst(), addLast(), getFirst(), getLast(), reversed() methods (JEP 431)
  • Add, remove, update, retrieve, sort, and search elements
  • Use Comparator and Comparable interfaces

6. Streams and Lambda Expressions

  • Use object and primitive Streams with lambda expressions
  • Perform decomposition, concatenation, reduction, grouping, partitioning
  • Use built-in functional interfaces (Predicate, Consumer, Function, Supplier)
  • Use Optional to handle absent values
  • Use new stream operations such as Stream.mapMulti and Stream.toList()

7. Java Platform Module System (JPMS)

  • Define modules and dependencies
  • Expose module content, use service loaders
  • Create runtime modules and applications using jlink and jpackage

8. Concurrent Programming (Virtual Threads & Structured Concurrency)

  • Create and manage threads using Runnable, Callable, and Future
  • Use the Executors framework and thread pools
  • Use Virtual Threads (JEP 444) for high-throughput concurrent applications
  • Understand Structured Concurrency (preview/incubator) concepts
  • Develop thread-safe code with locks, synchronized blocks, and concurrent API classes
  • Use parallel streams for concurrent processing

9. Java I/O API

  • Read and write to files and console using I/O streams
  • Implement serialization and deserialization
  • Use java.nio.file API (Path, Files)

10. Secure Coding in Java SE Applications

  • Develop code that mitigates common Java security vulnerabilities (input validation, immutability, defensive copying)
  • Use secure coding practices for handling sensitive data

11. Localization

  • Implement localization using Locale, resource bundles, and number/date formatting

5. Key Differences: Java 17 vs Java 21 Syllabus

While the two exams share most fundamental topics, several important differences exist:

What's New in Java 21 OCP (Not in Java 17)

What's Removed from Java 21 OCP

What's Unchanged

Which exam should you take? See our detailed Java 17 vs Java 21 comparison guide for a recommendation based on your career goals and current Java version usage at work.

6. How to Prepare for Java OCP

The OCP exams are challenging — the questions test deep understanding, not memorization. A typical preparation timeline is 6 to 12 weeks of focused study for experienced Java developers, longer for those new to functional programming or modules.

Recommended Study Approach

Common Pitfalls

Want more strategy? Read our How to Pass Java OCP on First Attempt guide for a week-by-week study plan.

✨ Practice with 2,000+ OCP Questions

Realistic practice tests for both Java 17 (1Z0-829) and Java 21 (1Z0-830) with detailed explanations.

Start Free Trial →

3 days free • Both exams covered • Downloadable certificates