Scope of a variable defines how a specific variable is accessible within the program or across classes. An assigned value to a variable makes sense and becomes usable only when the variable lies within the scope of the part of the program that executes or accesses that variable.
Variables are mainly of the following types:
Static Variables
Non-Static Varaiables
Reference: Oracle Official Documentation
The non-static variables are further classified into:
Block Variables
Local Variables
Class...
Published on October 07, 2020 06:51