In serialization and deserialization process, different object is created after deserialization ( i.e. deSerializedEmp is created from emp) , also member variables starts referring to different objects (i.e. name and map).