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 |
How to change value in arraylist java?
Can a boolean be null java?
What are the characteristics of java?
what are the design patterns in struts?
What do you mean by byte code?
What is a Hash Table? What are the advantages of using a hash table?
What is flush buffer?
Can we declare a class as abstract without having any abstract method?
Where can I find data structures question and answers with comprehensive working code written in Java
Can you extend singleton class?
Why Java is not pure Object Oriented language?
What are synchronized methods and synchronized statements in java programming?