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 statement block?
What is deadlock and how to avoid this?
what is the main class of all the classes
what is the use of private constructor in core java?
3 Answers OnMobile, Satyam, Yash Technologies,
Is null == null in java?
What is the superclass of exception?
What is passing parameters in java?
Difference between arraylist and vector.
what do you understand by synchronization? : Java thread
What is instanceof keyword?
how many ways to create Thread and which one is good? runnable interface ot Thread class?
Is set thread safe java?