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

I have a Person object with 5 variables and I want to store
them in a file called Person.txt. What should I do?

Answer Posted / srinu

we have imlpement ur class with java.lang.Serializible
interface and used the following steps
1)ObjectOutPutStream class(one method is their write objects
into file)
(a)writeObject(Object obj) -------> writing for objects
into file.This process is called Serializtion.

2)ObjectInputStream class reading the objects from file
(a)readObject(Object obj)---------> Reading objects from
fole This process is called Deserialization.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different conditional statements?

986


What do you mean by stream pipelining in java 8?

1219


Why are generics used?

960


what is the purpose of using rmisecuritymanager in rmi?

965


What is toarray method in java?

1092


Does printwriter create a file?

954


Enlist few advantages of inheritance?

1072


Does constructor creates the object ?

1030


What does the “static” keyword mean?

1098


What does @override mean?

1198


What is boolean data type in java?

993


What is a conditional equation?

1037


What is lambda in java?

1068


What data type is a string?

1008


What is the use of math abs in java?

1006