In Chapter 6 you will learn about:
In the Chapter 3 we learned about variables. You saw that there were different variable data types. There are also different variable scope types. But what exactly is scope? Variable scope refers to what can access a variable and what cannot access a variable. There are three levels of scope for variables in Java.
You will find that you commonly use all three types of variable scope types. It is important to understand the difference between them. In this section I will show you how all three variable types work. I will begin with static variables.