Variables declared in the class-scope (also called fields or members) can be accessed anywhere in the class and can also be accessed outside of the class (if decleared public).
Variables declared inside a method are accessible anywhere inside the method but are not accessible outside of the method. Method-scope variables can shadow class-scope variables. Method-scope variables are deleted when the method exits.
Variables declared inside a block are block-scope variables. They are not visible outside their block. Block-scope variables cannot shadow class- and method-scope variables. Block-scope variables are deleted when the block exits.