All Practice Exams

100+ Free Java SE 17 (1Z0-829) Practice Questions

Pass your Oracle Java SE 17 Developer Certified Professional (1Z0-829) exam on the first try — instant access, no signup required.

✓ No registration✓ No credit card✓ No hidden fees✓ Start practicing immediately
Not published Pass Rate
100+ Questions
100% Free
1 / 100
Question 1
Score: 0/0

Which generic method signature uses PECS (Producer Extends, Consumer Super) correctly to copy from a source list to a destination list?

A
B
C
D
to track
Same family resources

Explore More Oracle Certifications

Continue into nearby exams from the same family. Each card keeps practice questions, study guides, flashcards, videos, and articles in one place.

2026 Statistics

Key Facts: Java SE 17 (1Z0-829) Exam

50

Exam Questions

Oracle 1Z0-829 page

90 min

Time Limit

Oracle

68%

Passing Score

Oracle

$245

Exam Fee (USD)

Oracle 2026

Java SE 17

LTS Anchor

Oracle

Pearson VUE

Delivery Provider

Oracle

1Z0-829 contains 50 multiple-choice / multiple-select questions delivered over 90 minutes with a 68% passing score, costs $245 USD, and is delivered by Pearson VUE either at a test center or online via OnVUE. The exam is anchored on Java SE 17 LTS features (records, sealed classes, pattern matching for instanceof, text blocks). Pattern matching for switch is a preview feature in Java 17 only.

Sample Java SE 17 (1Z0-829) Practice Questions

Try these sample questions to test your Java SE 17 (1Z0-829) exam readiness. Each question includes a detailed explanation. Start the interactive quiz above for the full 100+ question experience with AI tutoring.

1Which statement about Java's `var` local-variable type inference (introduced in SE 10) is true in Java SE 17?
A.`var` can be used as a class field type
B.`var x = null;` is a valid declaration
C.`var` infers the type at compile time and can only be used for local variables, indexes in for-loops, and try-with-resources
D.`var` is a reserved Java keyword and cannot be used as a variable name
Explanation: `var` is a reserved type name (not a keyword) that triggers local-variable type inference. The compiler infers the static type from the initializer at compile time. It is restricted to local variables with initializers, enhanced/standard for-loop indexes, and try-with-resources resource declarations.
2Given: ``` int a = 5; int b = 2; double c = a / b; System.out.println(c); ``` What is printed?
A.2.5
B.2.0
C.2
D.Compilation error
Explanation: `a / b` is integer division because both operands are `int`, producing 2. The result is then widened to `double` when assigned to `c`, so `2.0` is printed.
3What is the value of `s.length()` after `String s = "caf\u00e9";`?
A.3
B.4
C.5
D.Compilation error
Explanation: `\u00e9` is a Unicode escape for the single character e-acute. The string contains the four characters c, a, f, e-acute, all of which fit in a single `char` (UTF-16 code unit), so `length()` returns 4.
4Which `String` method introduced before Java 17 returns `true` only when the string is empty or contains only whitespace characters as defined by `Character.isWhitespace`?
A.`isEmpty()`
B.`isBlank()`
C.`strip().isEmpty()` is the only valid approach
D.`trim().equals("")`
Explanation: `String.isBlank()` (added in Java 11) returns `true` when the string is empty or every character is a Unicode whitespace as defined by `Character.isWhitespace(int)`. It is preferred over `trim().isEmpty()` for Unicode-aware whitespace.
5Given the text block: ``` String s = """ hello world """; ``` What is the value of `s` (using `<NL>` to represent a newline)?
A.`hello<NL> world<NL>`
B.` hello<NL> world<NL> `
C.`hello world`
D.Compilation error: text blocks must use double quotes
Explanation: Text blocks (finalized in Java 15) strip incidental leading whitespace based on the indentation of the closing delimiter. Since the closing `"""` is indented by four spaces, four leading spaces are removed from each content line, leaving `hello`, then two extra spaces before `world`. Each content line ends with `\n`.
6Which declaration of a Java 17 record is valid?
A.`record Point(int x, int y) { int z; }`
B.`record Point(int x, int y) { public Point { if (x < 0) throw new IllegalArgumentException(); } }`
C.`abstract record Point(int x, int y) {}`
D.`record Point extends Number(int x, int y) {}`
Explanation: A record may declare a compact canonical constructor (no parameter list, no `this.x =` assignments) for validation/normalization. The header components are implicitly final fields and the compiler generates accessors, `equals`, `hashCode`, and `toString`.
7Which statement about sealed classes (finalized in Java 17) is correct?
A.Subclasses listed in `permits` must declare themselves `final`, `sealed`, or `non-sealed`
B.A sealed class may have any subclass as long as it is in the same module
C.`permits` is optional even when subclasses are in a different package
D.Sealed interfaces are not allowed; only sealed classes are
Explanation: Every direct subclass of a sealed class or interface must be `final`, `sealed`, or `non-sealed`, and must be listed in the `permits` clause. This locks down the subclass hierarchy at compile time.
8Given: ``` Object o = "hello"; if (o instanceof String s) { System.out.println(s.length()); } ``` Which statement is true under Java 17 standard features?
A.Compilation fails because `instanceof` cannot bind a variable
B.Pattern matching for `instanceof` is a final feature in Java 16+; the code prints 5
C.Pattern matching for `instanceof` is still preview in Java 17 and requires `--enable-preview`
D.The variable `s` is in scope after the `if` block as well
Explanation: Pattern matching for `instanceof` was finalized in Java 16 and is a standard feature in Java 17. When the pattern matches, the compiler binds `s` to the narrowed type for the true branch's flow scope, so `s.length()` returns 5.
9Given the switch expression: ``` int day = 3; String name = switch (day) { case 1, 7 -> "weekend"; case 2, 3, 4, 5, 6 -> "weekday"; default -> "unknown"; }; ``` Which statement is true?
A.Switch expressions require a `break` after each case
B.Each case label must list exactly one constant
C.The expression assigns `"weekday"` to `name` because case `3` matches with arrow form (no fall-through)
D.Compilation fails because `default` is mandatory only in switch statements, not switch expressions
Explanation: Arrow-form switch expressions, finalized in Java 14, do not fall through and may list multiple constants per label. With `day == 3`, the second case matches and `name` becomes `"weekday"`.
10Which `for` loop will throw a `ConcurrentModificationException` when executed?
A.Iterating a `List` with an explicit `Iterator` and calling `iterator.remove()`
B.Using `List.removeIf(predicate)` on an `ArrayList`
C.Iterating an `ArrayList` with an enhanced `for` loop and calling `list.remove(item)` inside the loop
D.Iterating a `CopyOnWriteArrayList` with an enhanced `for` loop and adding elements via the list
Explanation: Modifying an `ArrayList` directly while iterating with the enhanced `for` loop triggers the iterator's fail-fast check and throws `ConcurrentModificationException` on the next iteration.

About the Java SE 17 (1Z0-829) Exam

1Z0-829 is the Oracle Certified Professional exam for Java SE 17 LTS. It validates competency across Java fundamentals, modern language features (records, sealed classes, pattern matching for instanceof, text blocks, switch expressions), generics, the Stream and Date/Time APIs, NIO.2, JDBC, the module system (JPMS), concurrency, and localization.

Questions

50 scored questions

Time Limit

90 minutes

Passing Score

68%

Exam Fee

$245 USD (Oracle (delivered by Pearson VUE))

Java SE 17 (1Z0-829) Exam Content Outline

Core

Java Fundamentals and Language Features

Primitives, var, operators, strings, control flow, exception handling, records, sealed classes, pattern matching for instanceof, text blocks, switch expressions, enums.

Core

Object-Oriented Programming and Generics

Classes, inheritance, polymorphism, interfaces with default/static/private methods, nested classes, generics, wildcards (PECS), type erasure.

Heavy

Functional Programming and the Stream API

Lambdas, method references, java.util.function interfaces, Stream/IntStream/LongStream/DoubleStream, Optional, Collectors, parallel streams.

Core

I/O and NIO.2

Path/Files APIs, readers/writers, character vs byte streams, serialization, WatchService for filesystem change notifications.

Core

Date/Time API

LocalDate, LocalDateTime, ZonedDateTime, Instant, Duration, Period, formatting, parsing, time zones, DST handling.

Heavy

Concurrency

Threads, Executor framework, CompletableFuture, Lock and ReentrantLock, synchronized, volatile, atomic types, concurrent collections.

Core

Modules (JPMS)

module-info, requires/exports/opens/uses/provides, transitive dependencies, the unnamed module, jlink, jpackage.

Core

JDBC, Localization, Annotations

PreparedStatement, transactions, ResultSet navigation, ResourceBundle, NumberFormat, Locale, custom and repeatable annotations.

How to Pass the Java SE 17 (1Z0-829) Exam

What You Need to Know

  • Passing score: 68%
  • Exam length: 50 questions
  • Time limit: 90 minutes
  • Exam fee: $245 USD

Keys to Passing

  • Complete 500+ practice questions
  • Score 80%+ consistently before scheduling
  • Focus on highest-weighted sections
  • Use our AI tutor for tough concepts

Java SE 17 (1Z0-829) Study Tips from Top Performers

1Practice writing records, sealed classes, and switch expressions until the syntax is automatic; many questions hinge on small grammar details.
2Master the Stream API end to end: intermediate vs terminal operations, short-circuit semantics, primitive specializations, Collectors, and parallel-stream pitfalls.
3Drill the Date/Time API including DST behavior in ZonedDateTime and the difference between Duration and Period.
4Trace concurrency questions step by step: visibility (volatile), atomicity (AtomicInteger), happens-before, and ExecutorService lifecycle.
5Learn module-info syntax: requires, requires transitive, exports (qualified vs unqualified), opens, uses, and provides...with.

Frequently Asked Questions

What is the format of the Oracle 1Z0-829 exam?

1Z0-829 has 50 multiple-choice / multiple-select questions delivered over 90 minutes with a 68% passing score. It is administered by Pearson VUE at a test center or online via OnVUE.

How much does the Java SE 17 Developer (1Z0-829) exam cost?

The exam fee is $245 USD per attempt at the time of writing. Oracle occasionally bundles MyLearn access; check Oracle's certification site for current promotions.

Which Java 17 language features are tested?

1Z0-829 covers records (finalized in 16), sealed classes (finalized in 17), pattern matching for instanceof (finalized in 16), text blocks (finalized in 15), and switch expressions. Pattern matching for switch was a PREVIEW feature in Java 17 and is generally not exam-critical at the final-syntax level.

Does the certification expire?

Oracle's professional credentials do not expire, but they are tied to the Java SE version. Oracle has since released 1Z0-830 (Java SE 21). Stay current by upgrading on each LTS release if your role demands it.

What is the recommended preparation time?

Most candidates report 80-150 hours over 8-14 weeks: refresh fundamentals, drill the modern language features (records, sealed classes, pattern matching), then focus on streams, concurrency, modules, and JDBC.

How does 1Z0-829 differ from 1Z0-830 (Java SE 21)?

1Z0-830 covers Java SE 21 and adds final pattern matching for switch, virtual threads, and sequenced collections. 1Z0-829 is anchored on Java SE 17 LTS features only and treats those Java 21 additions as out of scope.