Oracle Certified Professional Java Se 11 Developer · Free Practice Question Hard
Question 33
Question ID: UKOCP80739
Below options are given to guard sensitive data during serialization:
1. Declare sensitive fields transient
2. Define the serialPersistentFields array field appropriately
3. Implement writeObject and use ObjectOutputStream.putField selectively
4. Implement writeReplace to replace the instance with a serial proxy
5. Implement the Externalizable interface
How many options are correct?
- A All five options
- B Only four options
- C Only three options
- D Only two options
- E Only one option
Reveal correct answer
Correct answer: A
Explanation
UKOCP80739:
Check below link and section:
https://www.oracle.com/java/technologies/javase/seccodeguide.html
Guideline 8-2 / SERIAL-2: Guard sensitive data during serialization
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
