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
Can we change the value of static variable?
Is main is a keyword?
What is string in java with example?
Do I need java for windows 10?
Difference between arraylist and hashset in java?
What are the features of junit?
How do you start a thread?
What is the maximum size of arraylist in java?
What is Classloader in Java?
Can you inherit from an abstract class java?
What do you mean by an interface in java?
Describe different states of a thread.
What is java command?
What is the benefit of abstract class?
What is complexity and its types?