Is it possible to make an array volatile?

Answer Posted / nashiinformaticssolutions

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

Explain thread in java?

888


What does ide stand for?

716


How many inner classes can a class have?

824


What is a variable analysis?

852


Explain about fail safe iterators in java?

804


What is assembly condition codes?

777


What is equlas() and hashcode() contract in java? Where does it used?

835


What is a Presistent Object?

946


What are the java ide’s?

807


What is difference between an object and a class?

846


What is qualitative variable?

745


What is an empty class? What functionality does it offer in Java?

983


How do you sort data in java?

743


what is difference betweem home interface and remote interface?

2354


What is the difference between choice and list?

853