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

What is the purpose of a volatile variable?

0 Answers  


what should do when using multiple catch() block & what should never do for the same?

1 Answers  


What is use of static in java?

0 Answers  


What is defined as false sharing in the context of multithreading?

0 Answers  


What languages are pass by reference?

0 Answers  






What is float in java?

0 Answers  


What are the standards to place package statement within a source code file?

1 Answers  


How to convert string to int in java?

1 Answers  


How do you reverse a string in java without using string buffer?

0 Answers  


Is list thread safe in java?

0 Answers  


I want to re-reach and use an object once it has been garbage collected. How it's possible?

0 Answers  


What is super in java?

0 Answers  


Categories