Explain the usage of the keyword transient?

Answer :
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).

0 comments:

Post a Comment

 
Copyright © Interview Questions and answers - Blogger Theme by BloggerThemes & freecsstemplates - Sponsored by Internet Entrepreneur