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

A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

1014


What is return data type?

1002


What are the different data types in java?

1002


Does substring start with 0?

982


How do you declare a destructor in java?

995


How do you end a program?

1114


How do you reverse a word in java?

1072


what is the difference between thread and runnable types? : Java thread

1001


how to create constants in java?

1078


Difference between start() and run() method of thread class?

1069


What is a constructor overloading in java?

1034


What is factor r?

963


What is empty list in java?

1071


Can a list be null in java?

1043


What are the common uses of "this" keyword in java ?

1017