1 Reply Latest reply on Aug 21, 2010 12:28 AM by EJP

    Adding a hashmap to already serialised class.


      I am having a serializable class A for some time in my project whose instances were serialized to a file in the past. Now I have added a new instance variable myMap which is of type HashMap to this class. In the constructor of class A i am initialising myMap as
       myMap = new HashMap
      . When i deserialize old instances of class A, I am expecting the newly added instance variable myMap to be null. But I am getting it as a empty HashMap. Can anyone explain me what happens when i add new variable(HashMap) to already seriliazed instances.