Oracle Certified Professional Java Se 11 Developer · Free Practice Question Medium
Question 92
Question ID: UKOCP21057
A named module can access classes present in the _____________ but not in the _____________.
- A unnamed modules, automatic modules
- B automatic modules, named modules
- C automatic modules, unnamed modules
- D unnamed modules, named modules
Reveal correct answer
Correct answer: C
Explanation
UKOCP21057:
A named module can access classes present in the automatic modules but not in the unnamed modules.
Named modules use requires <module>; directive, and requires directive with the module is not allowed.
Automatic modules' name is deduced from the jar file but unnamed modules don't have any names.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
