# Assignment

*noun*

say it: **“uh-SINE-ment”** **/əˈsaɪnmənt/**

Putting a value into a variable with the = sign, replacing whatever it held before.

## What is **Assignment** in Java?

**Assignment** — Storing a value in a variable with the = operator.

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

## In a sentence

- “The **assignment** total = total + price runs every time an item goes into the cart.”

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

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

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