Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do you differentiate abstract class from interface?

913


Define "Access specifiers" in java.

1121


How can you avoid serialization in child class if the base class is implementing the serializable interface?

1022


What is the difference between static and global variables and also define what are volatile variables?

986


Tell me are there implementations for sorting and searching in the java libarary?

977


What is final keyword?

1086


What is a method signature java?

989


What is the difference between super class & sub class?

1079


What is used of static keyword in java?

1002


What is a container in a gui?

932


how can i use a nonsynchronized hashtable?

2526


What is the difference between a method and a procedure?

998


Is java code slower than native code?

1002


How to display arraylist values in java?

955


Why is java logo a cup of coffee?

1073