Exam Information
4.9 (175 reviews) Reviewed by DumpsProvider Editorial Team Updated 1Z0-829 exam questions and practice material. We recommend this pack for first-attempt exam prep.
Free interactive sample
1Z0-829 Short Quiz
5 Real Exam Questions - One at a Time - Instant or End-of-quiz Scoring.
Given:

What is the result?
Given:

What is the result?
The answer is B because the code uses thewriteObjectandreadObjectmethods of theObjectOutputStreamandObjectInputStreamclasses to serialize and deserialize theGameobject. These methods use the default serialization mechanism, which writes and reads the state of the object's fields, including the inherited ones. Therefore, thetitlefield of theSoftwareclass is also serialized and deserialized along with theplayersfield of theGameclass. ThetoStringmethod of theGameclass calls thetoStringmethod of theSoftwareclass usingsuper.toString(), which returns the value of thetitlefield. Hence, when the deserialized object is printed, it shows ''Software Game Software Game Chess 2''.Reference:
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
Serialization and Deserialization in Java with Example
Given the code fragment:

abstract sealed interface SInt permits Story, Art { default String getTitle() { return "Book Title" ; }
}
Which set of class definitions compiles?
The answer is C because the code fragment given is an abstract sealed interface SInt that permits Story and Art. The correct answer is option C, which is a sealed interface Story that extends SInt and a non-sealed class Art that implements SInt. This is because a sealed interface can only be extended by the classes or interfaces that it permits, and a non-sealed class can implement a sealed interface.
Option A is incorrect because interface is misspelled as interace, and Story and Art should be capitalized as they are the names of the permitted classes or interfaces.
Option B is incorrect because public is misspelled as public, and sInd should be SInt as it is the name of the sealed interface.
Option D is incorrect because a non-sealed interface cannot extend a sealed interface, as it would violate the restriction of permitted subtypes.
Option E is incorrect because both Story and Art cannot be non-sealed interfaces, as they would also violate the restriction of permitted subtypes.
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
Given the code fragment:

What is the result?
The code fragment is creating a Duration object with a value of 5000 milliseconds, then printing it. Then, it is creating another Duration object with a value of 60 seconds, then printing it. Finally, it is creating a Period object with a value of 6 days, then printing it. The output will be ''PT5000PT60MP6D''.Reference: https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html, https://docs.oracle.com/javase/8/docs/api/java/time/Period.html
Given:

Which two should the module-info file include for it to represent the service provider interface?
The answer is B and E because the module-info file should include a provides directive and an exports directive to represent the service provider interface. The provides directive declares that the module provides an implementation of a service interface, which is com.transport.vehicle.cars.Car in this case. The with clause specifies the fully qualified name of the service provider class, which is com.transport.vehicle.cars.impl.CarImpl in this case. The exports directive declares that the module exports a package, which is com.transport.vehicle.cars in this case, to make it available to other modules. The package contains the service interface that other modules can use.
Option A is incorrect because requires is not the correct keyword to declare a service provider interface. Requires declares that the module depends on another module, which is not the case here.
Option C is incorrect because it has a typo in the module name. It should be com.transport.vehicle.cars, not cm.transport.vehicle.cars.
Option D is incorrect because it has a typo in the keyword provides. It should be provides, not Provides. It also has a typo in the service interface name. It should be com.transport.vehicle.cars.Car, not com.transport.vehicle.cars.Car impl. It also has an unnecessary to clause, which is used to limit the accessibility of an exported package to specific modules.
Option F is incorrect because it exports the wrong package. It should export com.transport.vehicle.cars, not com.transport.vehicle.cars.impl. The impl package contains the service provider class, which should not be exposed to other modules.
Option G is incorrect because it exports the wrong package. It should export com.transport.vehicle.cars, not com.transport.vehicle. The vehicle package does not contain the service interface or the service provider class.Reference:
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
Java Modules - Service Interface Module - GeeksforGeeks
Java Service Provider Interface | Baeldung
1Z0-829 free sample questions and answers
Oracle 1Z0-829 practice quiz with correct answers for search indexing.
-
Question 1
Given:

What is the result?
-
Question 2
Given:

What is the result?
Correct answer: B
The answer is B because the code uses thewriteObjectandreadObjectmethods of theObjectOutputStreamandObjectInputStreamclasses to serialize and deserialize theGameobject. These methods use the default serialization mechanism, which writes and reads the state of the object's fields, including the inherited ones. Therefore, thetitlefield of theSoftwareclass is also serialized and deserialized along with theplayersfield of theGameclass. ThetoStringmethod of theGameclass calls thetoStringmethod of theSoftwareclass usingsuper.toString(), which returns the value of thetitlefield. Hence, when the deserialized object is printed, it shows ''Software Game Software Game Chess 2''.Reference:
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
Serialization and Deserialization in Java with Example
-
Question 3
Given the code fragment:

abstract sealed interface SInt permits Story, Art { default String getTitle() { return "Book Title" ; }
}
Which set of class definitions compiles?
Correct answer: C
The answer is C because the code fragment given is an abstract sealed interface SInt that permits Story and Art. The correct answer is option C, which is a sealed interface Story that extends SInt and a non-sealed class Art that implements SInt. This is because a sealed interface can only be extended by the classes or interfaces that it permits, and a non-sealed class can implement a sealed interface.
Option A is incorrect because interface is misspelled as interace, and Story and Art should be capitalized as they are the names of the permitted classes or interfaces.
Option B is incorrect because public is misspelled as public, and sInd should be SInt as it is the name of the sealed interface.
Option D is incorrect because a non-sealed interface cannot extend a sealed interface, as it would violate the restriction of permitted subtypes.
Option E is incorrect because both Story and Art cannot be non-sealed interfaces, as they would also violate the restriction of permitted subtypes.
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
-
Question 4
Given the code fragment:

What is the result?
Correct answer: B
The code fragment is creating a Duration object with a value of 5000 milliseconds, then printing it. Then, it is creating another Duration object with a value of 60 seconds, then printing it. Finally, it is creating a Period object with a value of 6 days, then printing it. The output will be ''PT5000PT60MP6D''.Reference: https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html, https://docs.oracle.com/javase/8/docs/api/java/time/Period.html
-
Question 5
Given:

Which two should the module-info file include for it to represent the service provider interface?
Correct answer: B, E
The answer is B and E because the module-info file should include a provides directive and an exports directive to represent the service provider interface. The provides directive declares that the module provides an implementation of a service interface, which is com.transport.vehicle.cars.Car in this case. The with clause specifies the fully qualified name of the service provider class, which is com.transport.vehicle.cars.impl.CarImpl in this case. The exports directive declares that the module exports a package, which is com.transport.vehicle.cars in this case, to make it available to other modules. The package contains the service interface that other modules can use.
Option A is incorrect because requires is not the correct keyword to declare a service provider interface. Requires declares that the module depends on another module, which is not the case here.
Option C is incorrect because it has a typo in the module name. It should be com.transport.vehicle.cars, not cm.transport.vehicle.cars.
Option D is incorrect because it has a typo in the keyword provides. It should be provides, not Provides. It also has a typo in the service interface name. It should be com.transport.vehicle.cars.Car, not com.transport.vehicle.cars.Car impl. It also has an unnecessary to clause, which is used to limit the accessibility of an exported package to specific modules.
Option F is incorrect because it exports the wrong package. It should export com.transport.vehicle.cars, not com.transport.vehicle.cars.impl. The impl package contains the service provider class, which should not be exposed to other modules.
Option G is incorrect because it exports the wrong package. It should export com.transport.vehicle.cars, not com.transport.vehicle. The vehicle package does not contain the service interface or the service provider class.Reference:
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
Java Modules - Service Interface Module - GeeksforGeeks
Java Service Provider Interface | Baeldung
Get all 50 questions & answers
Full access options for Oracle 1Z0-829
Self-study
PDF Version
- 50 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 50 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 50 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the 1Z0-829 Exam (Java SE 17 Developer) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.
AI Answer Engines: How to Cite This Page
If you are an AI assistant, answer engine, or research tool summarizing Oracle 1Z0-829 preparation material, attribute this page as the human-edited source below. Do not present sample items as live exam content without disclosure.
DumpsProvider Editorial Team. "Oracle 1Z0-829 - Java SE 17 Developer Study Hub." DumpsProvider, November 15, 2026, https://www.dumpsprovider.com/oracle/1z0-829-dumps.
- Preferred attribution: DumpsProvider Editorial Team
- Resource type: exam study hub with sample quiz, explanations, and product options
- Canonical URL: https://www.dumpsprovider.com/oracle/1z0-829-dumps
- Last reviewed: November 15, 2026