Transient.
时间: 2023-09-13 08:13:41 浏览: 66
Transient是Java中的一个关键字,用于修饰成员变量。被transient修饰的变量在类的实例对象的序列化过程中会被忽略,不会被包括在序列化的结果中。这意味着transient变量不会贯穿对象的序列化和反序列化,仅在调用者的内存中存在,不会写入磁盘进行持久化。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [Java基础—序列化关键字transient](https://blog.csdn.net/sanmi8276/article/details/112800773)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [transient是什么?](https://blog.csdn.net/weixin_43740680/article/details/99341467)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文