In Serialization, whether you will use Static variables?
Answers were Sorted based on User's Feedback
Answer / chandramouli
We cannot serialize the static variables because static is
specific to the class not for the objects.
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / ranganathkini
Static variables are not serialized during object serialization.
If u want to serialize static fields, then u must use ur own
serialization overrides and implement the
java.io.Externalizable interface on the class.
Is This Answer Correct ? | 3 Yes | 2 No |
What is the purpose of a volatile variable?
what should do when using multiple catch() block & what should never do for the same?
What is use of static in java?
What is defined as false sharing in the context of multithreading?
What languages are pass by reference?
What is float in java?
What are the standards to place package statement within a source code file?
How to convert string to int in java?
How do you reverse a string in java without using string buffer?
Is list thread safe in java?
I want to re-reach and use an object once it has been garbage collected. How it's possible?
What is super in java?