序列化操作是将对象的属性内容进行二进制转换并保存,如果某些属性内容不需要保存, 就可以使用 transient 关键字来定义。 private transient String name; 此时,name 属性将不能被序列化。