Object serialization and deserialization when class field changed
<p>I have a question about Object serialization and deserialization when class field changed.</p>

<p>If an object with type MyClass</p>

<pre><code>MyClass {
    String str1;
    LinkedList mylist = new LinkedList();
    String str2;
</code></pre>

<p>}</p>

<p>has been serialized to file.</p>

<p>Then I changed the code which changes MyClass definition to</p>

<pre><code>MyClass {
    String str1;
    LinkedList mylist = new LinkedList();
    Map myMap = new HashMap();
</code></pre>

<p>}</p>

<p>After that, I deserialize the object from file to a MyClass object using the changed code. Is it OK? Will there any exception thrown during deserialization? I want to reuse the old object. I.e. I want the de-serializing can be done. So I hope there is no exception thrown.</p>

<p>Thanks.</p>
