1Z0-819 · Question #181
Which two describe reasons to modularize the JDK? (Choose two.)
The correct answer is B. Easier for security and maintainability D. Improve compilation performance. Modularizing the JDK (introduced in Java 9 via Project Jigsaw) improves security and maintainability (B) by enforcing strong encapsulation - internal JDK APIs are hidden by default, reducing the attack surface and preventing accidental reliance on implementation details. It…
Question
Options
- AEasier to understand the Java language
- BEasier for security and maintainability
- CEasier to expose implementation details
- DImprove compilation performance
- EEasier to build a custom runtime linking application modules and JDK modules
How the community answered
(52 responses)- A6% (3)
- B83% (43)
- C10% (5)
- E2% (1)
Explanation
Modularizing the JDK (introduced in Java 9 via Project Jigsaw) improves security and maintainability (B) by enforcing strong encapsulation - internal JDK APIs are hidden by default, reducing the attack surface and preventing accidental reliance on implementation details. It also improves performance (D) because the JVM can optimize class loading, startup time, and memory footprint when only the required modules are loaded, rather than the entire monolithic JDK.
Why the distractors are wrong:
- A - Modularization is a platform/runtime concern, not a language syntax change; it doesn't make Java itself easier to learn.
- C - This is the opposite of what modules do; strong encapsulation explicitly hides implementation details using
module-info.javaexports. - E - While
jlink(custom runtime images) is a benefit enabled by modularization, it's a downstream feature, not a core reason the JDK was modularized.
Memory tip: Think "S.P." - Security/maintainability and Performance are the two foundational why reasons; custom runtimes (jlink) are a what you can do with it bonus that comes after.
Topics
Community Discussion
No community discussion yet for this question.