What is transient variable?

By: Karthik Printer Friendly Format    

Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.



Most Viewed Articles (in Interview )

Interview Question: What is Deployment descriptor?

What do you understand by a J2EE module?

What are the call back methods in Session bean?

What is similarities/difference between an Abstract class and Interface?

Explain the user defined Exceptions?

Explain the new Features of JDBC 2.0 Core API?

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: Who wrote Struts?

Interview Question: Do you have to credit Struts on your own website?

Interview Question: Where can I get a copy of Struts?

Interview Question: How do I install Struts?

Interview Question: Does Struts include its own unit tests?

Interview Question: Where can I get help with Struts?

Interview Question: Why aren't the Struts tags maintained as part of the Jakarta Taglibs project ?

Interview Question: What is ActionServlet?

Latest Articles (in Interview)

Comment on this tutorial