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 are Transient and Volatile Modifiers?

Answer Posted / harika.thota001@gmail.com

we can use volatile in the application where a lot of threads are working simultaneously. Each thread having its local copy for instance variable. If we use volatile then it will become master copy. All will access the master copy. so whatever is latest we can use.

While Transient is used in the case of serialization.
Serialization is a process of writing an object in the files.
if we use prefix transient with variable than that variable value will not store when we write the object in the file.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between JDK and JVM?

1268


Are private methods final?

901


How do you add an element to a set in java?

1027


What is continuity of a function?

1088


Explain the term virtual machine?

1042


Are arrays primitive data types?

1182


What is a vararg?

1033


What are the two types of streams offered by java 8?

925


Can I declare class as static or private?

965


How do you sort objects in java?

958


What is the range of the short type?

1021


What is the difference between overriding and overloading in OOPS.

1158


Explain the overview of UDP messaging.

1127


What is illegal identifier in java?

1013


What is the hashcode () and equals () used for?

1034