In Serialization, whether you will use Static variables?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between hashmap and hashtable in java?

690


What is core java called?

710


Can a lock be acquired on a class in java programming?

713


Is java a security risk?

782


How listener identify that the event came from a particular object?

1695


Which keyword specify that a variable is effectively final ?

753


What is the difference between access specifiers and access modifiers in java?

820


What is array class in java?

767


When do we use synchronized blocks and advantages of using synchronized blocks?

867


What is super keyword explain with example?

742


Can an arraylist be empty?

758


What is variable and example?

709


State some advantages of java?

960


What is a generic code?

711


How do I remove a character from a string in java?

696