Question 308 of 513
1Z0-829 Java I/O API and Securing Applications Practice Question
Which interface should be implemented to create a custom filter for deserialization in Java?
⚠ Common exam trap
Test-takers frequently confuse `ObjectInputFilter` with `Serializable` or stream-level filters like `FilterOutputStream`, missing that the question specifically asks for a filter on the deserialization process itself.
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
✓
ObjectInputFilter
The `ObjectInputFilter` interface (introduced in Java 9) allows you to define a custom filter that validates classes and data being deserialized from an `ObjectInputStream`. By implementing this interface, you can reject potentially malicious or unexpected classes during deserialization, which is a key security measure against deserialization attacks.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
ObjectInputFilter
Why this is correct
Defines the filter to accept or reject classes during deserialization.
- ✗
Serializable
Why it's wrong here
Only marks a class as serializable.
- ✗
ObjectOutput
Why it's wrong here
Interface for object serialization output.
- ✗
FilterOutputStream
Why it's wrong here
For filtering output streams, not deserialization.
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 →
Last reviewed: Jun 25, 2026
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.
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.
Sign in to join the discussion.