为什么ArrayList的elementData加上transient修饰?

答案解析

防止elementData数组被序列化,提高序列化效率,数据通过writeObject自定义序列化。