Unlike C, you cannot have static variables inside methods. The only way to have static variables, is declare them inside the class, not the method, as you've already been shown how to do it.
A variable declared in a static method does not become static by default right?
No it doesn't. Instead, once the method ends, the variable and its value will be discarded, never to be seen again. If you execute the method again, you will just create another variable with the same name and same initial value.
If the variable pointed to an object, and you have another reference to that object outside the method, the object itself is not discarded of course. Only the variable's value, which is a reference to that object, is discarded.