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 the use of singleton class?
What are advantages and disadvantages of OOPs?
What is finally block?
Define immutable object?
Can a constructor be protected?
What is the range of a character variable?
Why 1 is not a prime number?
What are computer functions?
What is string length in java?
Explain about procedural programming language or structured programming language and its features?
Can private members of a base class are inheritable justify?
why Interface used?
What is equals method in java?
What is the parse method in java?
What is OOP Language?