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 arraylist e in java?
What is string in java is it a data type?
Why we go for collections in java?
Why set is used in java?
What is a line break?
What is the purpose of using javap?
Whats the difference between notify() and notifyall()?
Difference between predicate, supplier and consumer ?
What are the procedures?
Is string thread safe in java?
What is the difference between superclass and subclass?
What restrictions are placed on method overriding in java programming?
What is a java string?
What is type conversion in java?
How many types of interfaces are there?