Java SE 17 Developer — Question 36
Which statement is true about modules?
Answer options
- A. Only unnamed modules are on the module path.
- B. Automatic and named modules are on the module path.
- C. Only automatic modules are on the module path.
- D. Only named modules are on the module path.
- E. Automatic and unnamed modules are on the module path.
Correct answer: B
Explanation
The correct answer is B because both automatic and named modules can be included in the module path, allowing them to be accessible during runtime. Options A, C, D, and E are incorrect as they exclude either named or automatic modules, which are both valid on the module path.