Is it possible to make an array volatile?



Is it possible to make an array volatile?..

Answer / 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

More Core Java Interview Questions

What is unsigned char?

0 Answers  


What are the data types supported by java? What is autoboxing and unboxing?

0 Answers  


What is the function of http?

0 Answers  


Why does java have two ways to create child threads? Which way is better?

0 Answers  


What are the differences between the constructors and methods?

0 Answers  






What does pointer mean?

0 Answers  


Explain the concept of polymorphism with examples?

6 Answers   Summation Tech,


What are the performance implications of interfaces over abstract classes?

1 Answers  


Can we convert integer to string in java?

0 Answers  


What is a singleton factory?

0 Answers  


What are some alternatives to inheritance?

0 Answers  


what is the difference between @include page and @include file

2 Answers  


Categories