In Java, a variable is a labeled box in memory that stores data your program can use and change. Each variable has a name, a type, and a value.
- Name — what you call it (e.g.,
age) - Type — what kind of data it holds (e.g.,
int,double,String) - Value — the actual data stored (e.g.,
17)