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
What is the largest number a double can hold?
What is the class in java?
Difference between start() and run() method of thread class?
What is the difference between throw and throws keywords?
What is the main difference between java platform and other platforms?
How can we make a class singleton?
Can we override compareto method?
What do you understand by synchronization?
What is lambda expression in java?
What are the different types of java?
Can we restart a dead thread in java?
What is entry set in java?
How many types of constructors are used in java?
Which of the classes will have more memory allocated?
Justify your answer that you can't define a method inside another method in java, if you can then how?