Friday 22 June 2012

Atomic Variables in Java?

The java.util.concurrent.atomic package defines classes that support atomic operations on single variables. All classes have get and set methods that work like reads and writes on volatile variables. Knowing atomic operation is very important when we are writing thread operation in Java. Classes providing atomic access to main primitive types or to an object reference: AtomicBoolean, AtomicInteger and AtomicLong, AtomicReference.

No comments:

Post a Comment