nerdexam
Oracle

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…

Java Platform Module System

Question

Which of the following are advantages of Java Platform Module System?

Options

  • APlatform independence
  • BBetter Performance
  • CStrong Encapsulation
  • DObject Encapsulation
  • ENone of these
  • FAll of these

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    78% (21)
  • D
    4% (1)
  • E
    11% (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

#strong encapsulation#performance optimization#module exports#accessibility control

Community Discussion

No community discussion yet for this question.

Full 1Z0-819 Practice