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 2 objects inside one object(vector). how can i
serialize one of them. I dont want to serialize the second one

Answer Posted / atre sachin

suppose we are storing the two object of class A in Vector v1

class A implements serialiazable{
....
}

A a1=new A() //this will be the persist
transient A a2 =new A() //this will not persist because of the transient keyword.

now if I store the both a1 and a2 object in the vector v1 then we can achieve the goal given.
:-)

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is heterogeneous in java?

962


What is sortedmap in java?

1029


Is main an identifier?

1006


What is the use of list in java?

986


What is the difference between a checked and an unchecked exception?

993


How many threads can I run java?

1115


What is synchronization and why is it important in java programming?

940


Tell me about your ability to work under pressure

2196


What is time complexity algorithm?

1044


Write a java program to generate fibonacci series ?

1071


Can you make a constructor final?

1038


Explain java coding standards for variables ?

1170


What is java used for?

1015


What is the synonym of procedure?

1119


What is mean by exception?

1030