Courseiva
Java I/O API and Securing ApplicationshardMultiple SelectObjective-mapped

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

Which TWO statements about Java serialization are true?

⚠ Common exam trap

Many exam-takers assume constructors are always called during object creation, but Java serialization bypasses constructors for the serialized class, which can lead to unexpected behavior if initialization logic is missing.

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

During deserialization, the constructor of the serialized class is not invoked.

During deserialization, Java does not invoke the constructor of the class being deserialized. Instead, the object is reconstructed from the serialized stream data using the no-arg constructor of the first non-serializable superclass (if any), and the serialized class's fields are populated via reflection or readObject() methods. This avoids re-executing initialization logic that may have side effects or depend on runtime state.

Answer analysis

Option-by-option breakdown

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

  • The serialVersionUID must be explicitly declared in every serializable class.

    Why it's wrong here

    If not declared, Java computes one automatically.

  • During deserialization, the constructor of the serialized class is not invoked.

    Why this is correct

    Deserialization uses special mechanism without constructor.

  • A class that implements Externalizable does not need to implement Serializable.

    Why it's wrong here

    Externalizable extends Serializable.

  • Static fields are not serialized during serialization.

    Why this is correct

    Static fields belong to class, not instance.

  • Fields marked as transient are serialized by default.

    Why it's wrong here

    Transient fields are excluded from serialization.

About these practice questions

One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.