1Z0-819 · Question #131
Which of the following are advantages of Java Platform Module System?
The correct answer is B. Better Performance C. Strong Encapsulation. Java Platform Module System (JPMS), introduced in Java 9, delivers Strong Encapsulation (C) by allowing modules to explicitly declare which packages they export, hiding internal implementation details from other modules - a much stronger boundary than traditional package-level…
Question
Options
- APlatform independence
- BBetter Performance
- CStrong Encapsulation
- DObject Encapsulation
- ENone of these
- FAll of these
How the community answered
(27 responses)- A7% (2)
- B78% (21)
- D4% (1)
- E11% (3)
Explanation
Java Platform Module System (JPMS), introduced in Java 9, delivers Strong Encapsulation (C) by allowing modules to explicitly declare which packages they export, hiding internal implementation details from other modules - a much stronger boundary than traditional package-level access control. It also provides Better Performance (B) by enabling smaller, optimized runtime images (via jlink) and allowing the JVM to reason about the full dependency graph at startup, reducing memory footprint and improving load times.
Platform independence (A) is a property of the JVM itself - the "write once, run anywhere" guarantee has existed since Java 1.0 and has nothing to do with JPMS. Object Encapsulation (D) is a core OOP principle achieved through access modifiers (private, protected) - JPMS operates at the module level, not the object level, so this is a category error.
Memory tip: Think of JPMS as a "border wall" for your code - it Encapsulates what's inside each module (C) and makes the runtime leaner and faster by only loading what's needed (B). Platform independence and object encapsulation existed long before JPMS and are solved by different Java mechanisms entirely.
Topics
Community Discussion
No community discussion yet for this question.