How to customize Serialization:
Anyhow, Java handles serialization process then what’s the
need of customizing it. Let’s look at a small scenario.
Let’s consider our TestObject class has a transient
field so that it cannot get serialized and imagine we do not have the source
code for this class and we have a requirement that we need to get this field
serialized which has defined as transient in the source code like below.