Courseiva
Java Platform Overview and PackagingmediumMultiple ChoiceObjective-mapped

1Z0-829 Java Platform Overview and Packaging Practice Question

Given two named modules where module com.example.app requires module com.example.lib, which packages of com.example.lib are readable by com.example.app?

⚠ Common exam trap

Many candidates confuse `opens` with `exports`, thinking that opening a package for reflection also makes it readable, but `opens` only grants reflective access and does not allow compile-time or direct read access.

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

Only the packages exported by com.example.lib

In the Java module system, a module can only access packages from another module that are explicitly exported using the `exports` directive in the module's `module-info.java` file. Since `com.example.app` requires `com.example.lib`, only the packages exported by `com.example.lib` are readable; unexported packages remain encapsulated and inaccessible.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • All packages except those explicitly concealed

    Why it's wrong here

    All non-exported packages are concealed regardless of explicit concealment.

  • All packages of com.example.lib

    Why it's wrong here

    Non-exported packages are not readable.

  • Only the packages opened by com.example.lib

    Why it's wrong here

    Open packages are for reflective access, not readability.

  • Only the packages exported by com.example.lib

    Why this is correct

    A module reads only exported packages of required modules.

About these practice questions

One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.