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 return used for in java?
What are the legal operands of the instanceof operator?
How do you reverse sort a list in java?
What is difference between checked and unchecked exception in java?
What is the static method?
Which software is used for java programming?
What is an abstract method in java programming?
What is type parameter in java?
Can an interface be defined inside a class?
What is hash code collision?
Why are pointers not secure?
What is the purpose of a volatile variable?
Which java ide is used the most?
Is a boolean 1 bit?
How can you add and remove nodes in jtree?