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 meant by attribute?
Can private class be extended java?
Write a program to show whether a graph is a tree or not using adjacency matrix.
What does it mean that a class or member is final?
Explain scope or life time of local variables in java?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
Can we use both this () and super () in a constructor?
How does indexof work?
What is a parameter in simple terms?
What is your platform?s default character encoding and how to know this?
What is the common usage of serialization?
What is the latest version of java?
What are annotations in java?
Under what conditions is an object’s finalize() method invoked by the garbage collector?
What is the difference between method and means?