Return to site

JAVA CERTIFICATION QUESTION: Using the SecurityManager class in Java

· java,ocp

Imagine you are creating an application that reads sensitive information in a cache.

Given:

Which step below will best protect the application? Choose one.

A. Move line n2 up to be placed right after line n1.

B. Remove line n2.

C. Replace line n3 with String secret = AccessController.doPrivileged(pa, null);.

D. Replace line n3 with String secret = AccessController.doPrivileged(pa);.

 

·Ɐ sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ