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
What is a native method in java programming?
what is deadlock? : Java thread
Explain about the main() method in java?
What is difference overloading and overriding?
What is skeleton and stub? What is the purpose of those?
Give the difference between the println method and sqrt method?
What is an image buffer?
What is a condition in java?
What are the 3 types of control structures?
What is the largest number a double can hold?
What are some characteristics of interference class?
What is thread start?
How do you reverse a word in java?
What happens if a constructor is declared private?
What class allows you to read objects directly from a stream in java programming?