The easiest way to find out is to write a small program and try to compile it.
In
Java you cannot create static variables inside a method, like you can in C or C++ inside a function.
Also, you can't create a static member variable in a non-static inner class. You can only create a static member variable in a top-level class or in a static inner class.