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
Is a class subclass of itself?
does java support pointers?
What is break and continue statement?
What is difference between char array and string?
what is abstract class in Java?
When will you define a method as static?
how come we know the object is no more used in the class?
What is r in java?
Why pointers are not used in java?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
What is the difference between numeric and integer?
How do you sort arraylist in descending order?
What is arrays sort in java?
If an object is garbage collected, can it become reachable again?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?