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
What are streams in java 8?
which class is the wait() method defined in? : Java thread
Explain about instanceof operator in java?
What are the concepts of 'OOPS'?
What is the maximum size of array in java?
Is list ordered in java?
Which number is denoted by leading zero in java?
What is the benefit of abstract class?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
What is t in generics in java?
What is void keyword?
Is 0 a real number?
What types of index data structures can you have in java?
How do you create an array in java?
What is palindrome in java?