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 / rohit

Serializable concept is related with the state persisitence
of the object.
Example:---
When u send the some object on internet it needs to be
serialized bcz before sending the object it first converted
in to byte & desrerialization is the process is used to get
it back in its original form

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a private method be declared as static?

579


What is a copy constructor in java?

578


Can we make constructors static?

721


Why runnable interface is used in java?

564


What is the difference between the final method and abstract method?

538






How do you classify Dialog Box?

647


List types of storage classes in java?

615


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. How can I implement this logic?

634


What is a treeset class?

558


Define an abstract class with reference to java.

573


What is return type in java?

628


Which arithmetic operations can result in the throwing of an arithmeticexception?

595


What is a treemap in java?

536


What is boolean strategy?

622


How do you reverse sort a list in java?

505