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.

Ask a Question



Most Viewed Articles (in Interview )

Interview Question: What is ActionServlet?

Interview Question: What about JSTL and JavaServer Faces ?

Explain the different forms of Polymorphism.

Interview Question: Who makes the Struts?

Interview Question: Why it is called Struts?

Interview Question: What is Struts Validator Framework?

Interview Question: Is Struts compatible with other Java technologies?

Interview Question: Does Struts include its own unit tests?

Interview Question: Why are some of the class and element names counter-intuitive?

Interview Question: What are the optional clauses in EJB QL?

Interview Question: What is difference between EJB 1.1 and EJB 2.0?

Interview Question: Is Decorator an EJB design pattern?

Interview Question: Can i map more than one table in a CMP?

Interview Question: What is the difference between EAR, JAR and WAR file?

Interview Question: What is deployment descriptor?

Latest Articles (in Interview)

Comment on this tutorial