What is an atomic operation in Java?
An atomic operation is one that is completed as a single, indivisible unit of work, ensuring no other thread can interfere with it while itâ€™s being executed.
Exactly! Atomic operations are indivisible, ensuring thread safety by preventing interference from other threads.
Can you explain how `AtomicInteger` provides atomicity in Java?