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 |
I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.
what is webservices
5 Answers Consultancy, Mind Tree,
What is lazy programming?
List some oops concepts in java?
Can we have any code between try and catch blocks?
how to handle a singleton service locator. when multiple threads are trying to get the singleton object in same time
Distinguish method overloading and overriding
Is array a class in java?
How do you bind variables?
Can singleton class be serialized?
Why are global variables used?
What is static variable and static method?
32 Answers Accenture, Prolific, Prolifics, TCS, TNH,