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
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
What is the final variable?
When super keyword is used?
What do you understand by copy constructor in java?
what state does a thread enter when it terminates its processing? : Java thread
What's a method in programming?
Is java a virus?
What is singleton class in ruby?
Is arraylist ordered in java?
Write code of any action class?
What is a lambda expression ? What's its use ?
what do you mean by marker interface in java?
What is method overloading and method overriding?
what is singleton in java?
What is reverse function?