1.3 Variables
Introduction
A variable is a named, typed storage location whose value can change while a program runs. Declaring a variable reserves memory of the right size and shape for its type; every variable must be declared before it is used, and its type cannot change afterward.
Key Concepts
Java Syntax
Code Examples
`studentName` is declared and initialized in one step. `score` is declared first, then assigned separately — both are valid as long as a value exists before it's read.