Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is serialVersionUID and what is its need?



What is serialVersionUID and what is its need?..

Answer / javamasque

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

Post New Answer

More Core Java Interview Questions

What are the different types of java?

0 Answers  


Can you make an instance of an abstract class?

5 Answers   Accenture,


Is it safe for adding 10,00,000 records/objects to HashMap?, i.e is it safe to add millions of objects to HashMap?

2 Answers  


Can we declare an interface as final?

0 Answers  


What about instanceof operator in java?

0 Answers  


What is int argc char * argv?

0 Answers  


When we serialize an object does the serialization mechanism saves its references too?

0 Answers  


What are parsers? Dom vs sax parser.

0 Answers  


What is meant by class loader? How many types are there? When will we use them?

0 Answers  


Explain different types of wrapper classes in java?

0 Answers  


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

0 Answers  


what is the use of datasource in core java?

3 Answers   Satyam,


Categories