# Atomic Variable

A value supporting thread-safe single operations without an explicit lock.

## What is **Atomic Variable** in Java?

**Atomic Variable** — A value supporting thread-safe single operations without an explicit lock.

```java
import java.util.concurrent.atomic.AtomicInteger;

class Counter {
    AtomicInteger value = new AtomicInteger();

    void increment() {
        value.incrementAndGet();
    }
}
```

Level: Master · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/master)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/atomic-variable
