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 |
What is an immutable object? How do you create one in java?
system.out.println(1 + 3);
What access modifiers can be used for methods?
How do you find the maximum number from an array without comparing and sorting?
what is static import in java? Explain
What is the difference between compile-time polymorphism and runtime polymorphism?
Why we use multi threading instead of multiprocessing?
What is the purpose of using the java bean?
Explain the use of volatile field modifier?
Explain about anonymous inner classes ?
What are triggers in DB? Explain their types. How do they work?
What does @param args mean in java?