News

1 Variable scope Variable scope is the range of code where a variable is visible and can be referenced. In JavaSE, there are four types of variable scope: class, instance, method, and block.
An instance variable differs from a local variable in the nature of its scope and its lifetime. The entire class makes up the scope of an instance variable, not the method in which it was declared.