Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
20.7. Custom Serialization with Externalizable
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
2 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the main purpose of the Externalizable interface?
Hint
Think about how serialization differs between Externalizable and Serializable.
- 2.
Name the two methods you must implement when using Externalizable.
Hint
Consider what you need to do for serialization and deserialization.
- 3.
What must a class implement to allow custom serialization?
- Serializable
- Externalizable
- Cloneable
Hint
Think about which interface provides more control.
- 4.
True or False: Using Externalizable, all fields in a class must be serialized.
- True
- False
Hint
Consider why you might want to skip fields.
- 5.
Design a custom object in Java that implements Externalizable. Explain how your choice of fields impacts serialization performance.
Hint
Contemplate the size and sensitivity of data.
- 6.
Discuss how you would handle versioning issues when using Externalizable across different versions of an application.
Hint
Think about maintaining backward compatibility.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting