Advanced
Java
Q97 / 100
What is the purpose of the --add-opens JVM flag?
Correct! Well done.
Incorrect.
The correct answer is B) To relax the Java module system's encapsulation, granting deep reflective access to a module's non-public members
B
Correct Answer
To relax the Java module system's encapsulation, granting deep reflective access to a module's non-public members
Explanation
The JPMS (introduced in Java 9) encapsulates internals. --add-opens module/package=ALL-UNNAMED grants reflective access, commonly needed for legacy frameworks that rely on internal APIs.
Progress
97/100