- 50 Actual Exam Questions
- Compatible with all Devices
- Printable Format
- No Download Limits
- 90 Days Free Updates
Get All Java SE 17 Developer Exam Questions with Validated Answers
| Vendor: | Oracle |
|---|---|
| Exam Code: | 1Z0-829 |
| Exam Name: | Java SE 17 Developer |
| Exam Questions: | 50 |
| Last Updated: | July 12, 2026 |
| Related Certifications: | Oracle Java |
| Exam Tags: |
Looking for a hassle-free way to pass the Oracle Java SE 17 Developer exam? DumpsProvider provides the most reliable Dumps Questions and Answers, designed by Oracle certified experts to help you succeed in record time. Available in both PDF and Online Practice Test formats, our study materials cover every major exam topic, making it possible for you to pass potentially within just one day!
DumpsProvider is a leading provider of high-quality exam dumps, trusted by professionals worldwide. Our Oracle 1Z0-829 exam questions give you the knowledge and confidence needed to succeed on the first attempt.
Train with our Oracle 1Z0-829 exam practice tests, which simulate the actual exam environment. This real-test experience helps you get familiar with the format and timing of the exam, ensuring you're 100% prepared for exam day.
Your success is our commitment! That's why DumpsProvider offers a 100% money-back guarantee. If you don’t pass the Oracle 1Z0-829 exam, we’ll refund your payment within 24 hours no questions asked.
Don’t waste time with unreliable exam prep resources. Get started with DumpsProvider’s Oracle 1Z0-829 exam dumps today and achieve your certification effortlessly!
Given the code fragment:

What is the result?
The code fragment is creating a string variable ''a'' with the value ''Hello! Java''. Then, it is printing the index of ''Java'' in ''a''. Next, it is replacing ''Hello!'' with ''Welcome!'' in ''a''. Then, it is printing the index of ''Java'' in ''a''. Finally, it is creating a new StringBuilder object ''b'' with the value of ''a'' and printing the index of ''Java'' in ''b''. The output will be 8109 because the index of ''Java'' in ''a'' is 8, the index of ''Java'' in ''a'' after replacing ''Hello!'' with ''Welcome!'' is 10, and the index of ''Java'' in ''b'' is 9.Reference:Oracle Java SE 17 Developer source and documents: [String (Java SE 17 & JDK 17)], [StringBuilder (Java SE 17 & JDK 17)]
Which two code fragments compile?
A)

B)

C)

D)

E)

The two code fragments that compile are B and E. These are the only ones that use the correct syntax for declaring and initializing a var variable. The var keyword is a reserved type name that allows the compiler to infer the type of the variable based on the initializer expression. However, the var variable must have an initializer, and the initializer must not be null or a lambda expression. Therefore, option A is invalid because it does not have an initializer, option C is invalid because it has a null initializer, and option D is invalid because it has a lambda expression as an initializer. Option B is valid because it has a String initializer, and option E is valid because it has an int initializer.
https://docs.oracle.com/en/java/javase/17/language/local-variable-type-inference.html
Given:

What is the result?
The answer is B because the code fragment contains a logical error that causes a MissingResourceException at runtime. The code fragment tries to load a resource bundle with the base name ''Captions.properties'' and the locale ''en_US''. However, there is no such resource bundle available in the classpath. The available resource bundles are:
Captions.properties
Captions_en.properties
Captions_US.properties
Captions_en_US.properties
The ResourceBundle class follows a fallback mechanism to find the best matching resource bundle for a given locale. It first tries to find the resource bundle with the exact locale, then it tries to find the resource bundle with the same language and script, then it tries to find the resource bundle with the same language, and finally it tries to find the default resource bundle with no locale. If none of these resource bundles are found, it throws a MissingResourceException.
In this case, the code fragment is looking for a resource bundle with the base name ''Captions.properties'' and the locale ''en_US''. The ResourceBundle class will try to find the following resource bundles in order:
Captions.properties_en_US
Captions.properties_en
Captions.properties
However, none of these resource bundles exist in the classpath. Therefore, the ResourceBundle class will throw a MissingResourceException.
To fix this error, the code fragment should use the correct base name of the resource bundle family, which is ''Captions'' without the ''.properties'' extension. For example:
ResourceBundle captions = ResourceBundle.getBundle(''Captions'', currentLocale);
This will load the appropriate resource bundle for the current locale, which is ''Captions_en_US.properties'' in this case.Reference:
Oracle Certified Professional: Java SE 17 Developer
OCP Oracle Certified Professional Java SE 17 Developer Study Guide
ResourceBundle (Java Platform SE 8 )
About the ResourceBundle Class (The Java Tutorials > Internationalization)
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
Assume you have an automatic module from the module path display-ascii-0.2. jar. Which name is given to the automatic module based on the given JAR file?
An automatic module name is derived from the name of the JAR file when it does not contain amodule-info.classfile. If the JAR file has an ''Automatic-Module-Name'' attribute in its main manifest, then its value is the module name. Otherwise, the module name is derived from the JAR file's name by removing any version numbers and converting it to lower case. Therefore, for a JAR nameddisplay-ascii-0.2.jar, the automatic module name would bedisplay-ascii, following these rules.
Security & Privacy
Satisfied Customers
Committed Service
Money Back Guranteed