Add static variable in method body
Java's method can declare only local stack based varible, which is live only during a call. C method is something like it, but it support a "static" declare which makes the variable long lived between method call.
In java, because there is no "static" usage, so we need to put the variable as a "instance" field, although it works, but it smells worse in most cases. by using the "static" declare, we know only the method will using the variable, and it is not share for other methods, but instance varible shares for the all methods in the same class.
eg, a method may allocate 2K buffer for its process, since the method will calls frequently, to avoid allocate the space each time, we may make it as an instance varible, but it will make the class looks worse. instead, if we declare it as the method's "static" varible, it will be more clear.