Courseiva
Question 313 of 513
Java I/O API and Securing ApplicationshardMultiple SelectObjective-mapped

1Z0-829 Java I/O API and Securing Applications Practice Question

Which three actions help secure a Java application that uses serialization? (Select three.)

⚠ Common exam trap

Test-takers frequently confuse versioning best practices (like declaring `serialVersionUID`) with security controls, or think that using `SecureRandom` for `serialVersionUID` adds security, when in fact it only breaks compatibility and does nothing to prevent deserialization attacks.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Overriding resolveClass() in ObjectInputStream to validate class names.

Overriding `resolveClass()` in `ObjectInputStream` allows you to validate the class name before it is deserialized. This prevents deserialization attacks where an attacker sends a malicious class that could execute arbitrary code. By checking the class name against a whitelist, you can block untrusted classes from being loaded.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Overriding resolveClass() in ObjectInputStream to validate class names.

    Why this is correct

    Allows filtering of classes during deserialization.

  • Implementing ObjectInputFilter to set a deserialization filter.

    Why this is correct

    Standard way to restrict deserialization in Java 9+.

  • Using transient keyword for sensitive fields.

    Why this is correct

    Prevents sensitive data from being serialized.

  • Using SecureRandom to generate serialVersionUID.

    Why it's wrong here

    serialVersionUID is a long constant, not generated with SecureRandom.

  • Declaring serialVersionUID explicitly as a long constant.

    Why it's wrong here

    Helps with version compatibility but does not prevent attacks.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.