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 an immutable object? How do you create one in java?

1 Answers  


system.out.println(1 + 3);

8 Answers  


What access modifiers can be used for methods?

1 Answers  


How do you find the maximum number from an array without comparing and sorting?

1 Answers   BlackRock,


what is static import in java? Explain

1 Answers  


What is the difference between compile-time polymorphism and runtime polymorphism?

1 Answers  


Why we use multi threading instead of multiprocessing?

1 Answers  


What is the purpose of using the java bean?

1 Answers  


Explain the use of volatile field modifier?

1 Answers  


Explain about anonymous inner classes ?

1 Answers  


What are triggers in DB? Explain their types. How do they work?

1 Answers   Amdocs,


What does @param args mean in java?

1 Answers  


Categories