Home > DeveloperSection > Interviews > What are Transient and Volatile Modifiers?

Posted on    July-15-2011 12:28 AM

 Java Java 
 1 Answer(s)
  1405  View(s)
Rate this:

James Smith

Total Post:79

Posted on    July-15-2011 12:00 AM

Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. Transient variables are not serialized. Volatile: Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.

Don't want to miss updates? Please click the below button!

Follow MindStick