Actually, all variables are labels to some memory address.
And the values stored from there can occupy many extra adjacent memory addresses!
It all depends on their data-types.
Now, this definition of static I don't think is exactly what Java features!
In Java there are 2 main scopes for variables -> field (also called member) and local.
- Field -> it is a variable bound to a class. They are declared outside methods/functions.
- Local -> it is bound to a method and other inner scopes.
Field variables can be static or non-static. And local variables can't be declared static.
Normally, when a class is created, its purpose is to be instantiated.
Each instance creates isolated new copies of each field variable of its class.
Now, local variables are, by definition, isolated to their own scopes.
And they are destroyed, along w/ their content, once execution exits them.
So they are always internally non-static by nature.
However, Java's field variables can be declared as static.
It means they are created once and aren't instantiated. Only 1 permanent copy exists.
And their stored values are shared throughout all of the instances of the class they belong to!
And even more, static field variables can be accessed directly from their class,
w/o instantiating it 1st!!!
In short, C-style static local variables don't exist in Java. Their meaning are different!
Hope I haven't got you too confused! Peace!!!