Programming Tutorials

What is transient variable?

By: Karthik in Interview Tutorials on 2012-06-16  

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.





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

Explain the Encapsulation principle.

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

What is transient variable?

Interview Question: What is the difference between ejbCreate() and ejbPostCreate?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

What is Collection API?

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

What is the difference between JTS and JTA?

Interview Question: What are the call back methods in Entity bean?

What is Deployment Descriptor?

Interview Question: Where can I get help with Struts?

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

What are all the different scope values for the tag?

Interview Question: Write code of any Action Class?

Question: What is a Hidden Comment in JSP?

Latest Articles (in Interview)