If I understand correctly, it's a solution for a real life situation:
1. There is a class that's not serializable nor externalizable for some reason.
2. We have to extend it because we need its unique functionality, etc...
3.a We have to serialize our heir class.
3.b However, the parent class obstructs this.
4. So we have to "override" writeObject(), readObject() and readObjectNoData() as the documentation* recommends.
However, if there isn't any "no-arg constructor" in the superclass, this solution doesn't work.
Please correct me if I'm wrong.
*https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html
The reason of this
Resolved
Comments
- Popular
- New
- Old
You must be signed in to leave a comment
This page doesn't have any comments yet