title: How does marking a field as transient make it possible to serialise an object
body: <pre><code>public class Foo implements java.io.Serializable {
     private int v1;
     private static double v2;
     private Loan v3 = new Loan();
  }
  </code></pre>
  
  <p>Options:<br>
  A. An instance of Foo can be serialized because Foo implements Serializable.<br>
  B. An instance of Foo cannot be serialized because Foo contains a non-serializable instance variable v3.<br>
  C. If you mark v3 as transient, an instance of Foo is serializable.<br>
  D. b and c  </p>
  
  <p>Answer: D</p>
  
  <p>Explanation: An object may not be serialized even though its class implements <code>java.io.Serializable</code>, because it may contain non-serializable instance variables.</p>
  
  <p><strong>Now my question is:</strong></p>
  
  <p>As far as I know, transient is <a href="http://www.devx.com/tips/Tip/13726" rel="noreferrer">used</a> to turn off serialization. Then how is transient in this case, helping us to serialize foo?</p>