序列化和反序列化的过程就是生成和解析字节码的过程。JDK底层ArrayList的序列化和反序列化
//实现了Serializable接口,可以被序列化public class ArrayList<E> extends AbstractList<E>implements List<E>, RandomAccess, Cloneable, java.io.Serializable{private static final long serialVersionUID = 8683452581122892189L;/*** The array buffer into which the elements of the ArrayList are stored.* The capacity of the ArrayList is the length of this array buffer.*///实际元素被transient修饰,默认不会进行序列化private transient Object[] elementData;...../*** Save the state of the <tt>ArrayList</tt> instance to a stream (that* is, serialize it).** @serialData The length of the array backing the <tt>ArrayList</tt>* instance is emitted (int), followed by all of its elements