1Z0-829 Java Platform Overview and Packaging Practice Question
Which TWO statements are true about the Java module system?
⚠ Common exam trap
Oracle often tests the distinction between --add-exports (for type access) and --add-opens (for deep reflection), and the fact that exports are at the package level, not class level, causing candidates to confuse these concepts.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The --add-exports flag can be used to export a package from one module to a specific target module.
The --add-exports command-line flag allows you to export a package from one module to a specific target module at runtime, overriding the module system's encapsulation. This is useful for modules that do not export a package by default but need to be accessed by a specific module during development or testing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The --add-exports command-line flag opens a package for deep reflection.
Why it's wrong here
--add-exports adds compile-time and runtime access; --add-opens is for reflection.
- ✓
The --add-exports flag can be used to export a package from one module to a specific target module.
Why this is correct
It allows a module to access the public types of a package in another module.
- ✗
The jlink tool can generate module-info.java files for automatic modules.
Why it's wrong here
jlink does not generate module descriptors; it creates runtime images.
- ✓
A named module must have a module-info.java file in its root directory.
Why this is correct
The module descriptor defines the module.
- ✗
The exports directive can be used to export a specific class to another module.
Why it's wrong here
Exports are at package level, not class level.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.