In Serialization, whether you will use Static variables?

Answers were Sorted based on User's Feedback



In Serialization, whether you will use Static variables?..

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

In Serialization, whether you will use Static variables?..

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

In Serialization, whether you will use Static variables?..

Answer / krishna

We cannot serialize the static variables

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain the importance of finalize() method.

0 Answers  


What is the difference between class & structure?

0 Answers  


what is business delegate?

2 Answers   TCS,


How do you escape in java?

0 Answers  


What one should take care of, while serializing the object?

0 Answers  






Can we execute java program without main method?

0 Answers  


Is java free for businesses?

0 Answers  


If I only change the return type, does the method become overloaded?

0 Answers  


How to reverse string in java?

0 Answers  


Where pragma is used?

0 Answers  


Do you need to import math in java?

0 Answers  


Why object class is super class for every class in java?

0 Answers  


Categories