[原子类AtomicInteger] 1.getAndAdd(x)实现添加任意值 getAndIncrement()实现i++ 2.compareAndSet实现比较操作
1)添加数值packageorg.example.testatomic;importjava.util.concurrent.TimeUnit;importjava.util.concurrent.atomic.AtomicInteger;publicclassMain{publicstaticvoidmain(String[]args)throwsInterruptedException{Ato