Java SE 11 Developer (1Z0-819) — Question 102

Which two statements are correct about modules in Java? (Choose two.)

Answer options

Correct answer: D, E

Explanation

The correct answers are D and E because a module must indeed be declared in the module-info.java file to be recognized, and java.base does export all of the core packages of the Java platform. Options A and B are incorrect as module-info.java can be empty and must be placed in a specific location, while C is wrong since modules cannot access each other just by being in the same folder unless explicitly declared.