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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sizeof return?

1036


What is the full form of jpeg?

1007


Is 0 true or false in java?

1034


What is java basic concept?

1093


What is the meaning of variables in research?

1074


What does this () mean in constructor chaining concept?

1208


Explain the importance of throws keyword in java?

1042


Differences between external iteration and internal iteration?

1214


What is public/private protected in java?

1086


Can you give names of Container classes?

2354


How many types of gc are there in java?

1042


Can a class be declared as protected?

1061


What is a lock or purpose of locks in java?

1089


What are the main uses of this keyword?

1122


Explain about varargs in java?

1187