Tuesday, November 29, 2011

Core Java Interview Questions :Explain the usage of the keyword transient?

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).:Keyword "transient" indicates the JVM that this particular variable should not be serialized. Memory should be allocated at top level irrespective of the thread level.

No comments:

Post a Comment