why to use transient variables when static variables can be
used for Serialization
Answer Posted / priyanjan
static variables can also serialized but is a very
cumbersome process. Transient keyword prefixing any
variable states that the varible does serialized but its
state i.e. value of the varible, does not serialize.
| Is This Answer Correct ? | 10 Yes | 7 No |
Post New Answer View All Answers
What is array length?
Is java call by reference?
Explain the access modifiers for a class, method and variables?
What is byte [] in java?
Which is a valid identifier?
What is map and hashmap in java?
Can we create more than one object singleton class?
What are decalarations?
How will you reverse a link list without using recursion?
What’s the difference between the methods sleep() and wait()?
Can we declare array without size in java?
If a class is declared without any access modifiers, where can the class be accessed?
Difference between static binding and dynamic binding?
Is binary a low level language?
what invokes a threads run() method? : Java thread