J.IX · Java 25 practice question

A developer uses a module import declaration to import an aggregator module. What characterizes an aggregator module?

Choose one answer
Check answer and explanation

Correct answer: It exports no packages itself, but exports the packages exported by the modules it requires

Explanation

An aggregator module does not export any packages of its own, but it exports the packages that are exported by the modules it requires.

Common trap

Aggregator modules operate through module requires directives rather than merging classes into an unnamed package. An aggregator module only exposes packages that are already exported by the modules it requires, not encapsulated internal packages.

Source: JEP 511: Module Import Declarations — Description
Checked against the cited text on 2026-11-25.

Report an error in this question