Courseiva
Java Platform Overview and PackagingeasyMultiple ChoiceObjective-mapped

1Z0-829 Java Platform Overview and Packaging Practice Question

In a modular Java application, where does the module declaration file typically reside?

⚠ Common exam trap

Many exam-takers confuse the source file location (`module-info.java` at the root of the source tree) with the compiled output (`module-info.class` in the output directory), or mistakenly think it belongs in `META-INF` due to familiarity with JAR metadata.

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

In a file named module-info.java at the root of the module's source tree

The module declaration for a modular Java application must be placed in a file named `module-info.java` at the root of the module's source tree. This file is then compiled into `module-info.class` and placed in the output directory, but the source declaration resides in the source tree root as per the Java Platform Module System (JPMS) specification.

Answer analysis

Option-by-option breakdown

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

  • In a file named module-info.class in the output directory

    Why it's wrong here

    module-info.class is the compiled form, not the source declaration.

  • In the META-INF directory

    Why it's wrong here

    META-INF is for metadata like MANIFEST.MF, not module declarations.

  • In a file named module-info.java at the root of the module's source tree

    Why this is correct

    module-info.java is placed at the root of each module source tree.

  • In the root of the source directory

    Why it's wrong here

    The root of the source directory is for the entire project, not per module.

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.