Given the following class:
public class MyClass implements java.io.Serializable { public int iAmPublic; private int iAmPrivate; static int iAmStatic; transient int iAmTransient; volatile int iAmVolatile; . . . }
Assuming the class does not perform custom serialization, which fields are written when an instance of MyClass is serialized? (Choose all that apply.)
A. iAmPublic B. iAmPrivate C. iAmStatic D. iAmTransient E. iAmVolatile
A, B, E.
Default serialization writes all non-static non-transient fields.