Explain the usage of the keyword transient?

Q

Explain the usage of the keyword transient?

✍: Guest

A

This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).

2012-07-31, 2261👍, 0💬