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 )

What is Collection API?

Question: Difference between forward and sendRedirect in JSP?

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

Explain garbage collection?

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

What is the difference between Session Bean and Entity Bean?

Interview Question: Do ActionForms have to be true JavaBeans?

Question: How would you go about analyzing performance of an application?

Interview Question: Does Struts include its own unit tests?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

What are Access Specifiers available in Java?

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

Interview Question: Write code of any Action Class?

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

What is the difference between interface and abstract class?

Latest Articles (in Interview)