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 static methods?
How can you set an applet’s height and width as a percentage?
What is difference between core java and java ee?
What does indexof mean?
What is prefix of a string?
Can you declare the main method as final?
What is t in parametric equations?
State some advantages of java?
Explain about data types?
Difference between static synchronization vs. Instance synchronization?
When will we use them?
How does varargs work in java?
Why is stringbuffer thread safe?
Can we catch more than one exception in single catch block?
do I need to use synchronized on setvalue(int)? : Java thread