How will you override default serialization mechanism in java
Answer Posted / sharmila
Serializable is a marker interface. But you may wish to
control on how an object is serialized instead of using the
default mechanism. In such case add implementations of the
readObject() and/or writeObject() methods to the class being
serialized and override default serialization mechanism.
Also, instead of using Serializable interface,
Externalizable interface can be used
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Which package is imported by default?
What is field name?
What is the statements?
How do we access static members in java?
Print Vertical traversal of a Binary Tree.
How to display arraylist values in java?
What is operator overloading. Is it is supported in java?
What is time complexity algorithm?
how to handle exceptions in ejb?
Difference between stack and queue?
Name few "optional" classes introduced with java 8 ?
How we can generate random numbers in java?
What is token in java?
Can a static block throw exception?
How can we create a synchronized collection from given collection?