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

How do you check if a number is a perfect square?

0 Answers  


what is abstract class in Java?

0 Answers   Hexaware, Syntel,


Difference between String & StringBuffer

16 Answers   IBM, Infosys, Tech Mahindra, Wipro,


What are dot operator queries?

0 Answers   Atos Origin,


Java.util.regex consists of which classes?

0 Answers  


Which sorting is best in java?

0 Answers  


how can i connect to database in a applet ?

1 Answers  


What is the difference between length and length() method in java?

0 Answers  


Can a method be static?

0 Answers  


Can java inner class be static?

0 Answers  


What is the locale class in java programming?

0 Answers  


what is object type casting? give some example with related?

2 Answers   HP, SparkTG,


Categories