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 )

Question: What is a Hidden Comment in JSP?

Interview Question: What is abstract schema?

What types of comments are available in the JSP?

Tell me something about J2EE component?

Interview Question: Do ActionForms have to be true JavaBeans?

What is the difference between Session Bean and Entity Bean?

The output of System.out.println(5<<2) in Java

Differentiate between .ear, .jar and .war files.

What is Collection API?

Interview Question: Who wrote Struts?

Interview Question: How is the MVC design pattern used in Struts framework?

What is the difference between jsp:include page and @ include file?

What is the difference between JTS and JTA?

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

Why J2EE is suitable for the development of distributed multi-tiered enterprise applications?

Latest Articles (in Interview)