What are the Atomic Operations in Java ?

Java language provides some basic Atomic operations. These operations can be used to make sure that concurrent threads always see the same value.

Some of these Atomic operations are...

  • Read operations on reference variables and primitive variables (except long and double) .
  • Write operations on reference variables and primitive variables (except long and double) .
  • Read operations on all variables declared as volatile.
  • Write operations on all variables declared as volatile.


You May Interest

How Can We Improve the Performance of IdentityHashMap in Java ?

How Will You Create a Shallow Copy of a Map in Java ?

What are the Differences Between Internal and External Iterator i ...

Why Should You Define a Default Constructor in Java ?

How Will You Implement a Thread Safe JSP Page ?