why to use transient variables when static variables can be
used for Serialization
Answer Posted / lenina
only non static and non transient variables can be serialized.
if we want a variable to be instance variable,but the
variable is non serializable variable, then we declare that
variable as transient. here exactly we can make use of
transient.
Is This Answer Correct ? | 26 Yes | 7 No |
Post New Answer View All Answers
Which is faster string or stringbuilder?
Can I uninstall java?
What is java dot?
What are the advantages of autoboxing?
What is the generic function?
What is a Null object?
How do you achieve singleton?
What is a method declaration?
What is hash code collision?
Is java a prime method?
What is difference between static and abstract class?
Which number is denoted by leading zero in java?
What is float in java?
How do you implement tree mirroring in java?
How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?