With the declaration of every variable in Java, a natural question arises as soon as the variable is declared, “How long this variable be around ?” This question is answered by the Scope of Variable.
All the variables in Java and other languages have their scope or which may be called as the ‘Expiry date of a variable’
Learning about the scopes of Variable is a must thing to do for Java Developers to avoid errors like Shedding and '
Cannot find symbol' while programming.
I will recommend
Scope of Variable, to be read first before proceeding towards using variables randomly in different java functions.
Hope you find these articles useful,
Regards, Weasley