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 |
What are the different types of java?
Can you make an instance of an abstract class?
Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?
Can we declare an interface as final?
What about instanceof operator in java?
What is int argc char * argv?
When we serialize an object does the serialization mechanism saves its references too?
What are parsers? Dom vs sax parser.
What is meant by class loader? How many types are there? When will we use them?
Explain different types of wrapper classes in java?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
what is the use of datasource in core java?