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 a boolean flag in java?

954


What is the role of the java.rmi.naming class?

995


What is the function of static in java?

1007


What does three dots mean in java?

1058


What are the uses of synchronized keyword?

950


Explain about arraylist?

1014


can I implement my own start() method? : Java thread

931


What exactly is a .class file?

983


List implementations of list interface?

983


Why java strings are immutable in nature?

976


Is array dynamic in java?

875


If a method is declared as protected, where may the method be accessed in java programming?

939


What is math floor in java?

880


What super () does in java?

852


What is singleton math?

1048