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 a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion

2 Answers   SAP Labs,


explain the life cycle of thread?

10 Answers   CTS, NIIT, TCS,


What is the difference between sleep and wait in java?

0 Answers  


What does provide mean construction?

0 Answers  


Explain what is encapsulation?

0 Answers  


What happens when heap memory is full?

0 Answers  


different between exception and error? explaim check and uncheck exception

4 Answers  


What is object

6 Answers  


In case of inheritance what is the execution order of constructor and destructor?

0 Answers   Agilent,


How can we run a java program without making any object?

0 Answers  


What is use of inner class in java?

0 Answers  


Is ++ operator is thread safe in java?

0 Answers  


Categories