I\'ve seen a few posts discussing what a static variable is and I think I get it - but I\'d love to quickly write (or find) a program that utilizes both a regular and a stat
"static" refers more to the attributes of the variable (who what where) rather than just the value. Unlike other languages where it refers exclusively to the value.
It's like pinning the var to a specific location, be it inside a function or in the implementation.
It has similar attributes to a "private" var in that it's not visible to sibling or parents, but children can access.
It is a declaration with default value. Like in other languages where you define vars within a class and assign their "default" value:
private int myNumber = 3;
This gives us "class-like" variables within functions. Declare them once, then as the function manipulates the value, the value is retained. The next time the function is called, the value will be the same as it was after the previous "cycle", just like you would expect a class variable's value to remain after manipulation.