In this tutorial, I explain the basics of scope.
A variable declared outside of any method with the static keyword is called a class variable, and is available to all methods in the class (variables without the static keyword are called instance variables, and will be covered with object-oriented programming in future tutorials).
A variable that is declared inside of a method is local to that method, and only exists until that method is finished executing. It is not directly available to any other methods in the class.
On this page of the site you can watch the video online Java Programming: 5 - Variable Scope with a duration of hours minute second in good quality, which was uploaded by the user CodeMonkeyCharlie 23 May 2011, share the link with friends and acquaintances, this video has already been watched 60,475 times on youtube and it was liked by 606 viewers. Enjoy your viewing!