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 are the types of strings?
Can we use switch statement with strings?
How do you override a private method in java?
What classes of exceptions may be caught by a catch clause in java programming?
What are the skills required for core java?
What are the two environment variables that must be set in order to run any java programs?
What is the destroy method?
What causes memory leak in java?
What is the length of a string?
When does an object becomes eligible for garbage collection in java?
What is an immutable class? How to create an immutable class?
Can I learn java in 3 months?
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
In which language java is written?
Can we have multiple classes in single file ?