title: Is Atomic Integer incrementAndGet() thread safe?
body: <p>Is Atomic Integer incrementAndGet() method thread safe? I don't see any use of synchronized keyword in it. I am using following code to generate the unique id:</p>
  <pre><code>public enum UniqueIdGenerator {
      INSTANCE;
  
      private AtomicLong instance = new AtomicLong(System.currentTimeMillis());
  
      public long incrementAndGet() {
          return instance.incrementAndGet();
      }
  }
  </code></pre>
  <p>I am wondering if multiple threads that would call the method to generate unique ID result in any issue.</p>
  <pre><code>UniqueIdGenerator.INSTANCE.incrementAndGet()
  </code></pre>
  <p>Thanks!</p>