You are here

Introduction

Get the entire book!
Java for the Beginning Programmer

In Chapter 6 you will learn about:

  • Variable Scope
  • Functions
  • Methods
  • By Reference/By Value
  • Instance Variables
  • Variable Scope

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.

  • Static Variables
  • Instance Variables
  • Local Variables

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.

Technology: 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer