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
Does java isempty check for null?
What are the parts of a method?
Why bytecode is called bytecode?
What does i ++ mean in Java?
Explain the pointers in Java?
What is a Presistent Object?
What is the statements?
What is stringwriter?
What is java volatile?
What are the data types supported by java?
What are functions in java?
What is empty string literal in java?
What is anagram of a string?
which class is the wait() method defined in? : Java thread
How to obtain a performance profile of java program