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 array size in java?

916


How dead lock situation occurs in java and how you can identify it?

941


Can we use String with switch case?

1108


What's the difference between int and integer in java?

1094


What are examples of modifiers?

1013


What are user defined exceptions?

963


What is classpath?

955


How many ways can we create the string object?

960


What is the size of int in 64-bit jvm?

1011


What is a concrete classes? Is Java object class is concrete class?

938


How do you take thread dump in java?

942


What is the method overriding?

1040


How do you compare values in java?

975


What is the use of flag?

1020


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1190