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 / aman kr aggarwal
well if we dont use Serializable interface which is a
marker interface, then the object which we want to
serialize and use writeObject() method then compiler would
throw exception as if other object which r related to that
object if not serialized.
So. to overcome this we have to use Seializable interface.
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
In which order the iterator iterates over collection?
How are observer and observable used in java programming?
How is a structure different from array ?
explain autoboxing in java?
Can we force garbage collector to run ?
What is memory leak and how does java handle it?
Is arraylist dynamic in java?
Can we declare a class as static?
How do you use substring in java?
Which list is sorted in java?
What is an object in java and how is it created?
What is the difference between yielding and sleeping in java programming?
What is the difference between the paint() and repaint() methods in java programming?
What is difference between calling start() and run() method of thread?
What is r in java?