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

Can java list be null?

998


What is difference between null and void?

975


What does compareto () do in java?

1000


Explain the hierarchy of java exception classes?

1107


What are register variables what are the advantages?

905


Write a program to reverse a number in java?

1092


What is a for loop in java?

1047


Write a method that will remove given character from the string?

1029


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

992


What is finally block?

1057


What is default exception handling in java?

1033


What is the difference between I ++ and ++ I in java?

982


How will you call an Applet using Java Script Function?

1035


What are the different data types in java?

1011


Explain an intermediate language?

971