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
What is array initialization in java?
What will happen when using pass by reference in java?
What languages are pass by reference?
What a static class can contains?
What is the purpose of garbage collection in java? When is it used?
What is the default value of an object reference declared as an instance variable?
What is java and why do we need it? Explain
What is purpose of find feature?
Can a static class have a constructor?
How can you add and remove nodes in jtree?
What do you know about the garbage collector in java?
extending thread class or implementing runnable interface. Which is better? : Java thread
What is parsing and its types?
When should a function throw an exception?
What are user defined exceptions?