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

What data type is string java?

966


What modifiers are allowed for methods in an interface?

1164


How do you change an int to a string?

1009


Can we create object of inner class in java?

946


What is the difference between the direct buffer and non-direct buffer in java?

1032


Is void a data type in java?

989


What is class array in java?

1059


What is a variable analysis?

1090


Can we sort a map in java?

1047


How we can run a jar file through command prompt in java?

971


What is array list in java?

1083


how to one war file class to another war file class?

2077


What is singleton class example?

1028


What is mnemonic in assembly language?

1074


What is the major difference between linkedlist and arraylist?

1043