Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 Java 序列化,我知道当一个字段被标记为瞬态时,它不会被序列化。那么当对象被反序列化时,设置为瞬态的字段会发生什么?它们是否设置为构造函数中定义的值?
它们被设置为类型的默认值:零、假或空。