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

Why stringbuilder is not thread safe?

960


Is vector ordered in java?

950


Define an applet in java?

1080


How do you sort a string in java?

901


What is a list in java?

895


How can you make a class serializable in java?

939


Define nashorn in java8.

968


What is a nested class?

1046


What are runtime exceptions?

1105


What do you mean by chromounits in java8?

895


Is singleton thread safe in java?

912


Explain a few methods of overloading best practices in java?

917


Can you give names of Container classes?

2256


Why do we need singleton?

925


In how many ways we can do exception handling in java?

932