The javadoc for the java.util.concurrent.atomic package says the following:
A small toolkit of classes that support lock-free thread-safe programm
They are equivalent functionally, but there is a subtle difference. synchronized has the overhead of acquiring and releasing the monitor on this, while AtomicInteger is implemented with a native method call, so it will be significantly faster.
synchronized
this
AtomicInteger