dc dotCreds
Oracle Java SE 17 Developer Practice Test (1Z0-829)

Oracle Java SE 17 Developer Practice Test

Start today’s free 10-question Oracle Java SE 17 Developer set with source-backed explanations, local progress, and a fresh rotation every morning.

10 Free Daily Questions Source-backed Explanations 200 Verified Questions

Questions updated at Aug 29, 2026, 11:44 PM CDT

Go Pro - One Time Unlock

Unlock the full 1Z0-829 bank

200 verified questions Exam Mode Practice Mode Detailed explanations Weak-area review No subscription - one-time unlock

Get the complete source-backed bank with Interview Questions, the full Study Guide, full Course Notes, detailed explanations, weak-area review, and exam-style practice.

Interview Questions Full Study Guide Full Course Notes Exam Mode Practice Mode Guided Course Detailed explanations Weak-area review No subscription
$4.99 One-time payment
See bundle and PDF options

We will confirm your site email in one quick checkout step.

Why DotCreds?

Practice with explanations that teach.

Source links for every answer Every wrong answer explained Guided Course included Practice and Exam Mode Weak-area tracking Same verified bank across web practice

What you get with free practice

10 Free Questions Daily Fresh set every day from the live bank
Detailed Explanations Learn with clear source-backed answers
Track Your Progress Daily history and performance insights
Upgrade Anytime Unlock the full bank when you are ready
Today's 10 Oracle Java SE 17 Developer questions

Use this Oracle Java SE 17 Developer practice test to review Oracle Java SE 17 Developer 1Z0-829. Questions rotate daily and each answer links back to the source used to write it.

Today’s Set
10 questions
Rotates at 10:00 AM local time
Progress
0/10
Answered on this page
Accuracy
0%
Loading countdown…

200 verified questions are in the live bank. Free daily questions are selected from a rotating sample set. Unlock Pro to access the full question bank.

Preparing today’s free questions... Ordering the final locked-bank set before showing the practice cards.
Question 1 of 10
Objective Access control protected across packages Domain 3: Utilizing Java Object-Oriented Approach

Class `Child` in package `p2` extends `Base` in package `p1`; `Base` declares `protected int value`. From an instance method of `Child`, which access is legal when `other` has static type `Base` and `this` is a `Child`?

Concept tested:
Question 2 of 10
Objective CompletableFuture transformation Domain 8: Managing Concurrent Code Execution

What is the eventual result? ```java CompletableFuture<Integer> f = CompletableFuture.completedFuture(10) .thenApply(x -> x * 2); System.out.println(f.join()); ```

Concept tested:
Question 3 of 10
Objective Pattern matching for switch status in Java 17 Domain 2: Controlling Program Flow

A code review proposes using type patterns directly in a `switch` over an `Object`. The build uses normal `javac --release 17` without preview features. What should the reviewer conclude?

Concept tested:
Question 4 of 10
Objective DateTimeFormatter pattern letters Domain 1: Handling Date, Time, Text, Numeric and Boolean Values

A log formatter must print `2026-08-28 17:05` from a `LocalDateTime`. Which formatter pattern uses calendar year, month, day, 24-hour clock, and minute correctly?

Concept tested:
Question 5 of 10
Objective Unmodifiable view backing collection Domain 5: Working with Arrays and Collections

A service wraps a list: ```java var source = new ArrayList<>(List.of("A", "B")); var view = Collections.unmodifiableList(source); source.set(0, "X"); System.out.println(view); ``` What is printed?

Concept tested:
Question 6 of 10
Objective Locale language tag Domain 11: Implementing Localization

Which Java 17 expression creates a locale from the BCP 47 language tag for Canadian French, `fr-CA`?

Concept tested:
Question 7 of 10
Objective Stream.toList mutability Domain 6: Working with Streams and Lambda Expressions

A service executes: ```java List<String> out = Stream.of("A", "B").toList(); out.add("C"); ``` What happens in Java 17?

Concept tested:
Question 8 of 10
Objective Checked exception propagation Domain 4: Handling Exceptions

A method is declared: ```java static void load() throws IOException { ... } ``` A caller neither catches `IOException` nor declares it. What happens?

Concept tested:
Question 9 of 10
Objective Path resolve absolute operand Domain 9: Using Java I/O API

A path-composition helper runs on a Unix-like file system: ```java Path base = Path.of("/opt/app"); Path other = Path.of("/tmp/data"); System.out.println(base.resolve(other)); ``` Which path is printed?

Concept tested:
Question 10 of 10
Objective opens does not grant ordinary private access Domain 7: Packaging and Deploying Java Code and Using JPMS

Module `client` wants to directly compile `new InternalType()` where `InternalType` is package-private in another module. That package is `opens ... to client` but is not exported. What should you expect?

Concept tested:
Locked preview

You are viewing today’s free 10. Unlock 190 more questions.

Unlock full bank
Daily sample Rotating practice Free daily questions are selected from a rotating sample set.
Pro bank Full access Unlock Pro to access the full question bank, Exam Mode, Practice Mode, and random tests.
1Z0-829 Pro $4.99 one-time

Unlock all 200 Oracle Java SE 17 Developer questions, explanations, review tools, and exam-style practice.

50 Exam Practice Test $1.99 one-time

A 50-question 1Z0-829 PDF for short review sessions. Questions come first, then the answer review and explanations later in the file.

All Access $6.99/month

Unlock every active practice exam, bundle and path experience, Pro course and study content, and included downloads.

What’s includedEvery current and future active practice exam, All active bundle and career-path practice content, Pro course lessons, study content, and supported paid downloads

Choose an unlock option to continue. We will confirm your site email in one quick checkout step.

Secure checkout powered by Stripe. Source-backed questions. Not brain dumps. Checkout stays on this page and unlocks the same Pro builder on this practice page.

Purchase options

Unlock the full 1Z0-829 bank.

Get the full bank, Exam Mode, Practice Mode, question sets, random tests, readiness tracking, saved box scores, and review tools for this exam.

The PDF versions keep questions first and move the answer review, explanations, and distractor notes to the back of the file.

200 verified exam-style questions Every choice explained Exam Mode and Practice Mode Question sets and random tests Readiness score and trends Previous test box scores

You've answered 0/10 questions in today's set.

Locked: 190 more questions in the full bank.

Locked: exam simulation mode, practice mode, readiness tracking, and saved review history.

Checkout stays on this page, so you can keep practicing, unlock the full bank, and start Exam Mode or Practice Mode when you are ready.

Cheat Sheets

7-day score keeper

Answer questions today and this will become a rolling 7-day scorecard.

Local history
Optional progress sync

Keep today’s practice moving

Guest progress saves automatically on this device. Add an email later when you want a magic link that keeps your daily 1Z0-829 practice in sync across browsers.

Guest progress saves on this device automatically

Guest progress is available without an account.

Source-backed answer review

The free daily Oracle Java SE 17 Developer set includes crawlable question text, answer choices, correct answer labels, objective mapping, and source links. Only the first SEO card includes answer explanations and any extra learning features. Pro-only bank questions stay locked; this section mirrors only the 10 free daily questions already shown on this page.

Question 1 Class `Child` in package `p2` extends `Base` in package `p1`; `Base` declares `protected int value`. From an instance method of `Child`, which access is legal when `other` has static type `Base` and `this` is a `Child`?

Answer choices

  1. A. `this.value`
  2. B. `other.value`
  3. C. `new Base().value`
  4. D. `Base.value`

Correct answer

`this.value`

Across package boundaries, a subclass may access an inherited protected instance member through the subclass context, such as `this`; it may not use an arbitrary `Base` instance reference.

Wrong-answer review

  • B. `other.value`: Incorrect. An arbitrary superclass-typed instance from another package does not satisfy the protected access rule.
  • C. `new Base().value`: Incorrect. Constructing another `Base` does not grant package or subclass-qualified access to its protected member.
  • D. `Base.value`: Incorrect. The member is an instance field, not a static field.

Extra learning features

Interview question

Q: Across package boundaries, a subclass may access an inherited protected instance member through the subclass context, such as `this`; it may not use an arbitrary `Base` instance reference. This is crucial for maintaining encapsulation and preventing unintended access to internal implementation details of the base class. Without this restriction, subclasses could potentially expose sensitive data or modify the base class's state in unexpected ways, leading to instability and difficult-to-debug issues. Strong answer: Across package boundaries, a subclass may access an inherited protected instance member through the subclass context, such as `this`; it may not use an arbitrary `Base` instance reference.

  • protected access
  • encapsulation
  • instance member
  • subclass context
  • arbitrary Base instance reference

Caution: This is a fundamental aspect of Java's object model, and understanding it is critical for writing robust and maintainable code.

Why this matters

Incorrect access control can lead to vulnerabilities. Allowing unrestricted access to protected members from subclasses could expose sensitive data or enable malicious code to manipulate the base class's state, resulting in security breaches and data corruption. This has significant consequences for system integrity and user trust.

Objective/domain: Domain 3: Utilizing Java Object-Oriented Approach

Source: Java SE 17 Language Specification §6 — Names

Question 2 What is the eventual result? ```java CompletableFuture<Integer> f = CompletableFuture.completedFuture(10) .thenApply(x -> x * 2); System.out.println(f.join()); ```

Answer choices

  1. A. `null`
  2. B. `10`
  3. C. `12`
  4. D. `20`

Correct answer

`20`

Objective/domain: Domain 8: Managing Concurrent Code Execution

Source: Java SE 17 API — CompletableFuture

Question 3 A code review proposes using type patterns directly in a `switch` over an `Object`. The build uses normal `javac --release 17` without preview features. What should the reviewer conclude?

Answer choices

  1. A. Only add `default`; that makes type patterns standard Java 17 syntax.
  2. B. Use it freely because pattern matching for `switch` is a permanent Java 17 feature.
  3. C. Replace every type pattern with a record pattern; record patterns are standard in Java 17.
  4. D. Without preview enabled, type patterns in `switch` are unavailable in Java 17.

Correct answer

Without preview enabled, type patterns in `switch` are unavailable in Java 17.

Objective/domain: Domain 2: Controlling Program Flow

Source: Java Language Specification SE 17 — Blocks and Statements

Question 4 A log formatter must print `2026-08-28 17:05` from a `LocalDateTime`. Which formatter pattern uses calendar year, month, day, 24-hour clock, and minute correctly?

Answer choices

  1. A. `YYYY-MM-dd hh:mm`
  2. B. `YYYY-mm-DD hh:MM`
  3. C. `yyyy-mm-dd HH:MM`
  4. D. `yyyy-MM-dd HH:mm`

Correct answer

`yyyy-MM-dd HH:mm`

Objective/domain: Domain 1: Handling Date, Time, Text, Numeric and Boolean Values

Source: Java SE 17 API — DateTimeFormatter

Question 5 A service wraps a list: ```java var source = new ArrayList<>(List.of("A", "B")); var view = Collections.unmodifiableList(source); source.set(0, "X"); System.out.println(view); ``` What is printed?

Answer choices

  1. A. `[A, B]`
  2. B. An `UnsupportedOperationException` is thrown by `source.set`.
  3. C. `[X, B]`
  4. D. The view becomes empty because the wrapper is invalidated.

Correct answer

`[X, B]`

Objective/domain: Domain 5: Working with Arrays and Collections

Source: Java SE 17 API — Collections

Question 6 Which Java 17 expression creates a locale from the BCP 47 language tag for Canadian French, `fr-CA`?

Answer choices

  1. A. `Locale.of("fr", "CA")`
  2. B. `new Locale("fr_CA")`
  3. C. `Locale.forLanguageTag("fr-CA")`
  4. D. `Locale.forLanguageTag("fr_CA")`

Correct answer

`Locale.forLanguageTag("fr-CA")`

Objective/domain: Domain 11: Implementing Localization

Source: Java SE 17 API — Locale

Question 7 A service executes: ```java List<String> out = Stream.of("A", "B").toList(); out.add("C"); ``` What happens in Java 17?

Answer choices

  1. A. The list accepts `C` only if the source stream is sequential.
  2. B. The list becomes `[A, B, C]`.
  3. C. The `add` call throws `UnsupportedOperationException` because `Stream.toList()` returns an unmodifiable list.
  4. D. The code fails to compile because `toList()` was added after Java 17.

Correct answer

The `add` call throws `UnsupportedOperationException` because `Stream.toList()` returns an unmodifiable list.

Objective/domain: Domain 6: Working with Streams and Lambda Expressions

Source: Java SE 17 API — Stream

Question 8 A method is declared: ```java static void load() throws IOException { ... } ``` A caller neither catches `IOException` nor declares it. What happens?

Answer choices

  1. A. The `throws` clause affects documentation only.
  2. B. Compilation fails unless `IOException` is caught or declared.
  3. C. The exception is automatically converted to `RuntimeException`.
  4. D. The code compiles and the JVM logs the exception if it occurs.

Correct answer

Compilation fails unless `IOException` is caught or declared.

Objective/domain: Domain 4: Handling Exceptions

Source: Java Language Specification SE 17 — Exceptions

Question 9 A path-composition helper runs on a Unix-like file system: ```java Path base = Path.of("/opt/app"); Path other = Path.of("/tmp/data"); System.out.println(base.resolve(other)); ``` Which path is printed?

Answer choices

  1. A. `/opt/app/../tmp/data`
  2. B. The code throws `IllegalArgumentException`.
  3. C. `/opt/app/tmp/data`
  4. D. `/tmp/data`

Correct answer

`/tmp/data`

Objective/domain: Domain 9: Using Java I/O API

Source: Java SE 17 API — Path

Question 10 Module `client` wants to directly compile `new InternalType()` where `InternalType` is package-private in another module. That package is `opens ... to client` but is not exported. What should you expect?

Answer choices

  1. A. The JVM automatically treats every type in an opened package as public.
  2. B. Direct source-level access still fails; `opens` is for reflective access and does not make a package-private type an ordinary accessible API.
  3. C. The code compiles because `opens` is stronger than `exports` for all access.
  4. D. The code compiles only if the constructor is `protected`.

Correct answer

Direct source-level access still fails; `opens` is for reflective access and does not make a package-private type an ordinary accessible API.

Objective/domain: Domain 7: Packaging and Deploying Java Code and Using JPMS

Source: Java Language Specification SE 17 — Modules

Where to go after the daily web set

How are Oracle Java SE 17 Developer questions generated?

dotCreds builds Oracle Java SE 17 Developer practice questions from public exam objectives and Oracle exam and documentation references. The questions are written for realistic study practice, not copied from exam dumps.

How are explanations sourced?

Each question includes an explanation and, when available, a source link back to the provider documentation or reference used to validate the answer. That keeps the practice tied to study material you can actually review.

What score do I get?

The page tracks today's answered count and accuracy for the 10-question daily set, then saves a 7-day score history on this device so you can see your recent practice trend.

Why use this site?

The site is the fastest way to start Oracle Java SE 17 Developer practice without installing anything. It is built for daily recall, quick weak-topic discovery, and source-backed explanations you can review immediately.