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...

Is it possible to make an array volatile?

Answer Posted / glibwaresoftsolutions

It is not possible to create a volatile with Java. Only individual variables in Java can use volatile keywords; arrays and collections cannot. When a variable is specified as volatile, its value is never cached in a thread's local memory; instead, it is always read from and written to the main memory. This makes it simpler to ensure that any changes made to the variable are visible to all threads that access it.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between class and structure.

1071


What is the difference between object oriented programming language and object based programming language?

958


What are the three parts of a lambda expression?

955


How do you override a private method in java?

930


How we can skip finally block of exception even if some exception occurs in the exception block in java?

886


Does java have extension methods?

920


How you can force the garbage collection?

937


Can we override constructors?

949


Can a class be a super class and a sub-class at the same time? Give example.

1475


Can arraylist contain null values?

963


How do you check if a string is lexicographically in java?

914


What are the differences between path and classpath variables?

989


Is finalize() similar to a destructor?

984


What is the primitive type short?

984


What is printwriter in java?

908