Java / Java Serialization
How to prevent a child class from being serialized when it's parent class already implements Serializable interface?
When the parent implements serializable then the child Class also be serializable although it doesn't implement Serializable interface.
As a workaround, implement writeObject() and readObject() method in the child class and throw NotSerializableException from those methods.
More Related questions...