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 does 0 mean in boolean?
Where pragma is used?
What is the difference between a local variable and an instance variable?
What is the purpose of the strictfp keyword?
How do you check if a character in a string is a digit or letter?
What is final?
Can we call the run() method instead of start()?
What is treemap in java?
Is the milky way in a void?
Can an integer be a string?
What are decalarations?
Why are constructors used?
Can an arraylist be empty?
Explain the selection sort algorithm and state its time complexity?
What is the point of polymorphism java?