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


Please Help Members By Posting Answers For Below Questions

Can we use a switch statement with strings?

774


Define a java class.

1084


Is 0 an irrational number?

817


Explain about static imports in java?

783


Can size_t be negative?

799


What are the two types of java programming?

756


How is java created?

729


What happens when I use / and % with a negative numerator?

781


can any body body expalin best definitions & best real time exaples for opps concepts.

2042


What is args length in java?

930


Why is it called a string?

751


What is the maximum size of array in java?

740


What is a condition in java?

712


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

1033


what is singleton in java?

801