In Serialization, whether you will use Static variables?
Answers were Sorted based on User's Feedback
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 |
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 java, how we can disallow serialization of variables?
What is the difference between public, private, protected, and friend access?
What is methods in java?
Can we print null in java?
Does any tag exists in HTML to upload and download files ?
What is the difference between static (class) method and instance method?
How does system arraycopy work in java?
what should do when using multiple catch() block & what should never do for the same?
Java is based on pass by reference or pass by value ..
take any 4 input numbers. like 2345.. wanted out put is All 16 combinations of the number 2345.. for example- taking input as 4565 output- 5654 4556 4655..
What is the difference between Synchronizing mehtod & Synchronizing block?
What is a ternary operator in java?