PrepZone Logo
PrepZone
Back to Java

Java · Easy

What is the transient keyword? Why use it?

JavaCore Java

Answer preview

transient marks a field to be excluded from serialization. When an object is serialized, transient fields are skipped and receive their default values upon deserialization.…