# Variable

*noun*

say it: **“VAIR-ee-uh-bul”** **/ˈvɛriəbəl/**

A named box in your program that holds one value, which the program can read and change while it runs.

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

**Variable** — A named place that stores a value a program can use or change.

```java
class Game {
    void updateScore() {
        int score = 10;
        score = score + 5;
    }
}
```

## In a sentence

- “I stored the player's score in a **variable** called score and added 10 to it after every level.”

Level: Novice · [More Java terms at this level](https://www.ask-codey.com/glossary?category=java&level=1)

Updated: October 26, 2026

## In other subjects

- [Variable in C#](https://www.ask-codey.com/glossary/variable-c-sharp)
- [Variable in JavaScript](https://www.ask-codey.com/glossary/variable-javascript)
- [Variable in Python](https://www.ask-codey.com/glossary/variable)

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