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 variable argument in java?
What is the maximum size of a string in java?
What is the difference between preparedstatement and statement in java?
What an i/o filter?
What is the difference between java applets and applications?
What is the difference between double and float variables in java?
Why does java does not support multiple inheritance? Explain
Explain inner classes ?
What is the effect of keeping a constructor private?
What is meant by collection in java?
What do you mean by composition in java?
What is the difference between serializable and externalizable interface?
What do you mean by ternary operator in java?
What is the inheritance?
Explain the advantages of packages in java?