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
What is the use of http-tunneling in rmi?
What is the use of singleton?
What is the difference between synchronized and synchronized block?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
How do you start a thread?
What is covariant return type?
Are floats faster than doubles?
What is the range of a character variable?
What is the purpose of static methods and static variables?
What is the use of isempty in java?
what is the use of bean managed and container managed with example?
what is method reference in java 8?
Name few java util classes introduced with java 8 ?
what do you understand by the term string with respect to java?
What is lambda programming?