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.

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

Updated

In other subjects