What is serialVersionUID and what is its need?
The serial version UID is metadata about the serializable object, it is hash code for the serializable object. It contains information about class name, field name, field type, implemented interfaces and super classes. For each modification to serializable object, we have to update serial version UID explicitly. If we do not provide any serial version UID, JVM’s default serialization mechanism generates serial version UID for the object at runtime.
During deserialization, JVM matches the serial version UID from object stream with the serializable object which will receive the stream data. If there is a mismatch in serial version UID, JVM throws InvalidClassException
Is This Answer Correct ? | 7 Yes | 0 No |
How to perform Singleton of the java class object on multi JVM?
What are the rules for naming an array?
What does || || mean in math?
i don't want fullforms of JDK an JVM i want definitions for them
Can a class with private constructor be extended?
What are the various access specifiers in java?
How do you do descending order in java?
What is used of static keyword in java?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
Can a serialized object be transferred via network?
List out five keywords related to exception handling ?
Write a program to print fibonacci series