Most ignored concept in java but very important from interview point of view : SerialVersionUID
Believe me or not, serialVersionUID is the most ignored concept in java. But as you get familiar with it, you will get to know how important and how powerful this concept is. So, lets deep dive to understand the serialVersionUID concept. Prerequisite You need to have prior knowledge of serialization and deserialization to understand the serialVersionUID concept better. What is serialVersionUID? When we serialize an object, JVM generates one unique identifier for serializable class. Which is used at the time of deserialization to verify the sender (who serializes the object) and the receiver (who deserializes the object) have loaded the same compatible serializable class versions at their side? This unique identifier is called serialVersionUID . How JVM calculates default serialVersionUID? JVM uses various aspects of the class to calculate the serialVersionUID like class name, implemented interface, all members of that class, etc. The calculation of default serialVersionUID