What is the need to implement Serializable interface (with
no methods) for objects which are to be serialized ?
We can write our own functionality which writes objects to
streams then why we need to implement and tell JVM that
which objects can be serialized.
Answer Posted / chellammal
Implementing Serializable interface signifies that the
object can be persisted. Otherwise, when you try to
use writeObject, it will throw
java.io.NotSerializableException
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
What is a module function?
What is a programming object?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Do we need to manually write Copy Constructor?
What is the difference between final, finally and finalize()?
State the difference between creating string as new () and literal.
Differentiate between == and equals().
What is the association?
What are the rules for variable declaration?
What exactly is a .class file?
What is instance synchronization?
Does list allow duplicates in java?
What are the 6 functions?
What is autoboxing in java?
How do you add an element to a hashset in java?