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

Can we sort a map in java?

990


What is a lock or purpose of locks in java?

979


Can we declare a constructor as final?

1227


does java support pointers?

949


How to create a fecelet view?

949


why doesn't java run on all platforms?

989


What is a copy constructor in java?

1062


What about interrupt() method of thread class ?

1020


What flag up means?

994


Is string is a data type in java?

995


what is inner class in java?

1087


Say any two properties in beans?

1025


Can we define static methods inside interface?

936


Explain JMS in detail.

978


What is java command?

1025