In Serialization, whether you will use Static variables?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of super keyword in java?

591


How does hashset work in java?

557


What is the file extension for java?

599


What are thread local variables?

542


What is class forname used for?

533






What is passed by reference and pass by value ?

576


What is java virtual machine and how it is considered in context of java’s platform independent feature?

643


What is purpose of keyword void?

556


What is reflexive association?

999


What are the basic interfaces of java collections framework?

591


What are encapsulation, inheritance and polymorphism?

521


Define canvas?

560


What is the difference between multiple processes and multiple threads?

569


What are the advantages of packages in java?

568


What is the scope or life time of instance variables?

647