Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Transient and volatile

Answer Posted / subrahmanyam

transient
identifies a variable not to be written out when an
instance is serialized (It can'nt be copied to remove
system)

volatile
indicates that the field is used by synchronized threads
and that the compiler should not attempt to perform
optimizations with it.

When more than one thread share a (volatile) data it is
checked every time. Every thread keeps the latest value of
volatile variable

Is This Answer Correct ?    30 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is getkey () in java?

1013


Differentiate between nested and inner class in java.

1006


What is a condition in programming?

1013


What do you understand by final value?

1061


What is the difference between array list and vector in java?

937


What is treemap in java?

950


What is use of functional interface in java 8? Explain

1020


What do you mean by default constructor in java?

1074


Is java se open source?

1036


What do you mean by JVM?

1082


Define an applet in java?

1166


If I only change the return type, does the method become overloaded?

927


How to create com object in Java?

1083


What is a treeset class?

1012


How transient variable is different from volatile variable?

1086