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
What is heterogeneous in java?
What is sortedmap in java?
Is main an identifier?
What is the use of list in java?
What is the difference between a checked and an unchecked exception?
How many threads can I run java?
What is synchronization and why is it important in java programming?
Tell me about your ability to work under pressure
What is time complexity algorithm?
Write a java program to generate fibonacci series ?
Can you make a constructor final?
Explain java coding standards for variables ?
What is java used for?
What is the synonym of procedure?
What is mean by exception?