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
Why java applets are more useful for intranets as compared to internet?
What does substring mean?
Are arrays static in java?
How do you convert int to char in java?
What happens if main method is not static?
Difference between string, stringbuffer and stringbuilder?
What is thread start?
What is private public protected in java?
Why is singleton not thread safe?
Name four container classes.
Break statement can be used as labels in java?
What does jenkins do?
Is math class static in java?
What do you understand by garbage collection in Java? Can it be forced to run?
What is the purpose of a default constructor?