Question: if a long variable is declared as :-

**private volatile long counter = 0;**

now if i increment it using pre-increment operator, then would the operation be atomic ?

if yes, then will it be more efficient than `java.util.concurrent.atomic.AtomicLong` object's increment ??

Answer: 
`volatile` keyword only solves [visibility](http://www.ibm.com/developerworks/library/j-jtp03304/) problem. You have to use `AtomicLong` or `synchronized` method/block for atomicity ([Atomicity in concurrent programming](http://en.wikipedia.org/wiki/Atomicity_%28programming%29)).

One more article that came out today: [Demonstrating when volatile is required](http://java.dzone.com/articles/demonstrating-when-volatile)
The short answer is No. You will need to synchronize the method that increments counter, or, preferably, use an AtomicLong.

For the record, ++ operators are not atomic *even on integers*.