Static local variables
are allowed in C/C++. People who learned these languages first may expect
Java to work the same way. Java is similar to C++, but is not a super-set of C++.
Here's an explanation of local static variables in C,
NOT Java There's only one instance, which lives in fixed memory (not the stack or heap). It behaves like any other static variable, which is to say its value/state are remembered across multiple invocations of the enclosing function.