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...

How do we make a class serialize?

Answer Posted / javamasque

We have to fallow below steps to serialize an object
1. The object to be serialized need to implement java.io.Serializable / java.io. Externalizable interface.
2. Generate serial version id for that serializable object.
3. ObjectOutputStream is used to write [writeObject(..) or wirteExternal()] object.
4. FileOutputStream is used to persist in flat file.
5. The flat file extension should be (<file-name>.ser)

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of use of pointers in java class.

963


What is incompatible types in java?

984


What is the benefit of using enum to declare a constant?

1038


Can we have 2 main methods in java class?

949


When do you call copy constructor?

907


What are wrapped classes in java programming?

1017


What do you mean by garbage collection used in java?

1010


Which is bigger float or double java?

924


What is the use of http-tunneling in rmi?

1000


What does I ++ mean?

999


What is the use of generics? When was it added to the Java development Kit?

962


What is difference between this and super keyword?

937


Is a char always 1 byte?

930


What is an empty class? What functionality does it offer in Java?

1201


What is primitive data type in java?

910