Code example for AtomicInteger

Methods: decrementAndGet

0
    public void increment() { 
        count.incrementAndGet();
    } 
 
    public void decrement() { 
        count.decrementAndGet();
    } 
 
    public int getCount() { 
        return count.get();
    } 
}