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 is super keyword explain with example?
Can we define private and protected modifiers for variables in interfaces?
Can we compare two strings in java?
What is void data type?
How many tetrahedral voids are there in bcc?
How can we make a class singleton?
Is singleton class thread safe?
explain the difference between jdk and jvm?
Write a code to show a static variable?
What loop means?
Difference between a class and an object?
How do you declare a variable?
What is dynamic binding(late binding)?
What is square root in java?
What is volatile data type?