SaveMyCert
Exam prep

Java SE 25 vs 21 certification: what changed

The Java SE 25 certification, Oracle Certified Professional: Java SE 25 Developer (exam 1Z0-831), tests the Java language and core APIs as they stand in Java 25, so it covers several features that only became standard Java after Java 21: unnamed variables, flexible constructor bodies, stream gatherers, scoped values, module import declarations, compact source files with instance main methods, and launching multi-file source programs. Everything else a Java SE 21 candidate studies (records, sealed types, pattern matching, text blocks, sequenced collections, virtual threads, modules, streams, concurrency, I/O and localization) is still on the exam. The style of the exam has not changed either: most questions show a program and ask what it does.

Oracle certifies one long-term-support release at a time

Oracle has offered a separate Professional exam for each long-term-support Java release rather than one exam that moves with every six-monthly release. Java SE 21 had its own exam (1Z0-830); Java SE 25 has 1Z0-831. Each one is pinned to the language as it stood in that release, so the newer exam includes features the older one could not test.

Study for the exam you will actually sit. A book or course written for Java SE 21 still covers most of 1Z0-831, but not the features below, and the gaps are exactly where a candidate who skipped them loses marks.

What is new on the Java SE 25 exam

These features became standard Java between Java 22 and Java 25, and the 1Z0-831 objectives name each of them:

  • Unnamed variables and patterns: the underscore for a variable or pattern you must declare but never use, such as an unused catch parameter, lambda parameter or record-pattern component.
  • Flexible constructor bodies: statements before the explicit super(...) or this(...) call, for validating or preparing arguments, with strict rules about what that code may touch.
  • Stream gatherers: the gather intermediate operation and the built-in gatherers such as windowFixed, windowSliding, fold and scan, for transformations that map, filter and reduce cannot express.
  • Scoped values: sharing immutable context with the code a thread calls, and with virtual threads, as a bounded alternative to thread-local variables.
  • Module import declarations: import module java.base; and similar, which import every package a module exports in one line.
  • Compact source files and instance main methods: a source file with a top-level void main() and no class declaration, plus the IO class for simple console input and output.
  • Multi-file source-code programs: running a program with java Main.java when Main uses other source files that the launcher compiles on demand.

What stays the same

The core of the exam is unchanged. It is still about reading Java precisely: primitives and casting, String and StringBuilder, the Date-Time API, switch statements and expressions with patterns, classes, records, sealed hierarchies, interfaces, enums, exceptions, collections, streams, modules, concurrency, I/O and localization. Questions still show a short program and ask what it prints, whether it compiles, or which change makes it work.

That means the habit that decides most results is the same as before: read each snippet first as the compiler, checking types, access and checked exceptions, and only then as the runtime. The new features are where candidates who already know older Java pick up or lose the margin.

How to prepare if you studied for Java SE 21

Start with the new features, because they are the one part of the exam your existing knowledge does not cover. For each one, read the lesson, write a few small programs on a JDK 25 and run them, then take a practice session on that topic. Afterwards, sit a full timed mock to see whether the rest of your knowledge has held up, and work through the official topics in order for anything that slipped.

Our OCP Java SE 25 study plan sets out the full four-phase approach, and the OCP Java SE 25 study notes, practice questions and mock exams follow the official 1Z0-831 objectives one for one.

Ready to start studying — free?

Original practice questions, timed mock exams and revision notes. No card, nothing to pay.

Jump straight into an exam
1Z0-831 study notes1Z0-831 cheat sheet1Z0-831 practice questions

Questions, answered

It is broader rather than harder. The question style is the same code-reading format, and the exam adds the features that became standard after Java 21. Candidates who know Java 21 well mainly need to learn those additions.

Source

Exam details in this post come from the vendor's published exam guide, which is the authority on what is tested and how.

Keep reading

Exam prep
How many practice questions do you need before the exam?
Exam prep
What a good practice-question explanation looks like
Exam prep
AZ-900 and AZ-104 renewal: what expires and how to renew
Exam prep
How to build a cloud home lab for certification practice