1.

What Do You Understand By Transient Variables In Java?

Answer»

Java has a SPECIAL keyword known as transient which indicates that a variable should not be serialized when it is stored to streams of bytes. Whenever an object is transferred through a network it should be serialized to convert the object STATE into SERIAL bytes.

Transient variables are INITIALIZED by their DEFAULT value during de-serialization. For instance, for object transient variable, the value would be NULL.

Java has a special keyword known as transient which indicates that a variable should not be serialized when it is stored to streams of bytes. Whenever an object is transferred through a network it should be serialized to convert the object state into serial bytes.

Transient variables are initialized by their default value during de-serialization. For instance, for object transient variable, the value would be NULL.



Discussion

No Comment Found